Fix shape lightmap optimize

hg/feature/cdb-packed
kaetemi 11 years ago
parent 9a19f2041b
commit 0e0de8ec52

@ -69,6 +69,7 @@ if BuildShadowSkinEnabled:
printLog(log, ">>> Setup build directories <<<") printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory)

@ -77,16 +77,19 @@ else:
# copy lightmap_not_optimized to lightmap # copy lightmap_not_optimized to lightmap
printLog(log, ">>> Optimize lightmaps <<<") printLog(log, ">>> Optimize lightmaps <<<")
loPathLightmapsOriginal = ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory loPathLightmapsOriginal = ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory
loPathShapesOriginal = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory
mkPath(log, loPathLightmapsOriginal) mkPath(log, loPathLightmapsOriginal)
loPathLightmaps = ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory loPathLightmaps = ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory
loPathShapes = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory loPathShapes = ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory
loPathTags = ExportBuildDirectory + "/" + ShapeTagExportDirectory loPathTags = ExportBuildDirectory + "/" + ShapeTagExportDirectory
mkPath(log, loPathLightmaps) mkPath(log, loPathLightmaps)
mkPath(log, loPathShapes) mkPath(log, loPathShapes)
mkPath(log, loPathTags) mkPath(log, loPathTags)
if needUpdateDirByTagLog(log, loPathLightmapsOriginal, ".txt", loPathLightmaps, ".txt") or needUpdateDirNoSubdir(log, loPathLightmapsOriginal, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathShapes, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathTags, loPathLightmaps): if needUpdateDirByTagLog(log, loPathLightmapsOriginal, ".txt", loPathLightmaps, ".txt") or needUpdateDirNoSubdir(log, loPathLightmapsOriginal, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathShapesOriginal, loPathShapes) or needUpdateDirNoSubdir(log, loPathShapes, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathTags, loPathLightmaps):
removeFilesRecursive(log, loPathLightmaps) removeFilesRecursive(log, loPathLightmaps)
copyFiles(log, loPathLightmapsOriginal, loPathLightmaps) copyFiles(log, loPathLightmapsOriginal, loPathLightmaps)
removeFilesRecursive(log, loPathShapes)
copyFiles(log, loPathShapesOriginal, loPathShapes)
# Optimize lightmaps if any. Additionnaly, output a file indicating which lightmaps are 8 bits # Optimize lightmaps if any. Additionnaly, output a file indicating which lightmaps are 8 bits
# lightmap_optimizer <path_lightmaps> <path_shapes> [path_tags] [path_flag8bit] # lightmap_optimizer <path_lightmaps> <path_shapes> [path_tags] [path_flag8bit]
subprocess.call([ LightmapOptimizer, loPathLightmaps, loPathShapes, loPathTags, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/list_lm_8bit.txt" ]) subprocess.call([ LightmapOptimizer, loPathLightmaps, loPathShapes, loPathTags, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/list_lm_8bit.txt" ])

@ -46,8 +46,8 @@ printLog(log, "")
printLog(log, ">>> Install shape <<<") printLog(log, ">>> Install shape <<<")
installPath = InstallDirectory + "/" + ShapeInstallDirectory installPath = InstallDirectory + "/" + ShapeInstallDirectory
mkPath(log, installPath) mkPath(log, installPath)
mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, installPath, ".shape") copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory, installPath, ".shape")
mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".shape") copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".shape")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".dds") copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".dds")

Loading…
Cancel
Save