mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-17 13:01:41 +00:00
Fix shape lightmap optimize
This commit is contained in:
parent
0fdba79819
commit
98fadea8bf
3 changed files with 8 additions and 4 deletions
|
@ -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…
Reference in a new issue