mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 15:46:18 +00:00
Add build shadow skin to shape process
This commit is contained in:
parent
991bf1244f
commit
0d0907aa08
3 changed files with 17 additions and 10 deletions
|
@ -82,8 +82,6 @@ ShapeExportOptLightmapLog = "%PreGenShapeExportOptLightmapLog%"
|
|||
# Coarse mesh texture mul size
|
||||
TextureMulSizeValue = "%PreGenTextureMulSizeValue%"
|
||||
|
||||
DoBuildShadowSkin = 0
|
||||
|
||||
ClodConfigFile = ""
|
||||
|
||||
# *** COARSE MESH TEXTURE NAME ***
|
||||
|
@ -117,7 +115,7 @@ MapHlsBankFileName = None
|
|||
|
||||
# *** SHAPE BUILD OPTIONS *
|
||||
|
||||
DoBuildShadowSkin = False
|
||||
BuildShadowSkinEnabled = False
|
||||
ClodConfigFile = ""
|
||||
|
||||
# *** PACS_PRIM OPTIONS ***
|
||||
|
|
|
@ -62,6 +62,8 @@ mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirector
|
|||
mkPath(log, ExportBuildDirectory + "/" + ShapeAnimExportDirectory)
|
||||
if ClodConfigFile != "":
|
||||
mkPath(log, ExportBuildDirectory + "/" + ClodExportDirectory)
|
||||
if BuildShadowSkinEnabled:
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeShadowSkinBuildDirectory)
|
||||
|
||||
# Setup build directories
|
||||
printLog(log, ">>> Setup build directories <<<")
|
||||
|
|
|
@ -51,21 +51,28 @@ LightmapOptimizer = findTool(log, ToolDirectories, LightmapOptimizerTool, ToolSu
|
|||
TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix)
|
||||
BuildCoarseMesh = findTool(log, ToolDirectories, BuildCoarseMeshTool, ToolSuffix)
|
||||
|
||||
if DoBuildShadowSkin:
|
||||
shapeDirectory = ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory
|
||||
if BuildShadowSkinEnabled:
|
||||
mkPath(log, shapeDirectory)
|
||||
shadowSkinBuildDirectory = ExportBuildDirectory + "/" + ShapeShadowSkinBuildDirectory
|
||||
printLog(log, ">>> BuildShadowSkin <<<")
|
||||
printLog(log, "********************************")
|
||||
printLog(log, "******** TODO ********")
|
||||
printLog(log, "********************************")
|
||||
shadowSkinShapes = findFilesNoSubdir(log, shapeDirectory, ".shape")
|
||||
for shadowSkinShape in shadowSkinShapes:
|
||||
srcShape = shapeDirectory + "/" + shadowSkinShape
|
||||
dstShape = shadowSkinBuildDirectory + "/" + shadowSkinShape
|
||||
if needUpdateLogRemoveDest(log, srcShape, dstShape):
|
||||
subprocess.call([ BuildShadowSkin, srcShape, dstShape, str(BuildShadowSkinRatio), str(BuildShadowSkinMaxface) ])
|
||||
shapeDirectory = shadowSkinBuildDirectory
|
||||
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory)
|
||||
mkPath(log, shapeDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory)
|
||||
if ClodConfigFile != "":
|
||||
mkPath(log, ExportBuildDirectory + "/" + ClodExportDirectory)
|
||||
printLog(log, ">>> Build CLodTex <<<")
|
||||
subprocess.call([ BuildClodtex, "-d", DatabaseDirectory + "/" + ClodConfigFile, ExportBuildDirectory + "/" + ClodExportDirectory, ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory ])
|
||||
subprocess.call([ BuildClodtex, "-d", DatabaseDirectory + "/" + ClodConfigFile, ExportBuildDirectory + "/" + ClodExportDirectory, shapeDirectory, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory ])
|
||||
else:
|
||||
printLog(log, ">>> Copy Shape <<<")
|
||||
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeNotOptimizedExportDirectory, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, ".shape")
|
||||
copyFilesExtNoTreeIfNeeded(log, shapeDirectory, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, ".shape")
|
||||
|
||||
# copy lightmap_not_optimized to lightmap
|
||||
printLog(log, ">>> Optimize lightmaps <<<")
|
||||
|
|
Loading…
Reference in a new issue