mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
Fix shape lightmap optimize
This commit is contained in:
parent
9a19f2041b
commit
0e0de8ec52
3 changed files with 8 additions and 4 deletions
|
@ -69,6 +69,7 @@ if BuildShadowSkinEnabled:
|
|||
printLog(log, ">>> Setup build directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory)
|
||||
|
||||
|
|
|
@ -77,16 +77,19 @@ else:
|
|||
# copy lightmap_not_optimized to lightmap
|
||||
printLog(log, ">>> Optimize lightmaps <<<")
|
||||
loPathLightmapsOriginal = ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory
|
||||
loPathShapesOriginal = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory
|
||||
mkPath(log, loPathLightmapsOriginal)
|
||||
loPathLightmaps = ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory
|
||||
loPathShapes = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory
|
||||
loPathShapes = ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory
|
||||
loPathTags = ExportBuildDirectory + "/" + ShapeTagExportDirectory
|
||||
mkPath(log, loPathLightmaps)
|
||||
mkPath(log, loPathShapes)
|
||||
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)
|
||||
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
|
||||
# lightmap_optimizer <path_lightmaps> <path_shapes> [path_tags] [path_flag8bit]
|
||||
subprocess.call([ LightmapOptimizer, loPathLightmaps, loPathShapes, loPathTags, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/list_lm_8bit.txt" ])
|
||||
|
|
|
@ -46,8 +46,8 @@ printLog(log, "")
|
|||
printLog(log, ">>> Install shape <<<")
|
||||
installPath = InstallDirectory + "/" + ShapeInstallDirectory
|
||||
mkPath(log, installPath)
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory)
|
||||
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, installPath, ".shape")
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory)
|
||||
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory, installPath, ".shape")
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory)
|
||||
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".shape")
|
||||
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".dds")
|
||||
|
|
Loading…
Reference in a new issue