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