Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Harmonikater
BF2-3dsMax-Tools
Commits
a169058e
Commit
a169058e
authored
Aug 12, 2019
by
Harmonikater
Browse files
bugfixes in texture copying during auto lm
parent
cabe10b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
scripts/bf2/Statics/auto_lm.ms
View file @
a169058e
...
...
@@ -135,9 +135,13 @@ fn auto_lightmap_setup mapFolder sizefile:undefined areaShadows:False =
local sun_name = pathconfig.appendpath mapFolder "Sky.con"
bf2ImportSunglight fname:sun_name areaShadows:areaShadows
local savePath = pathconfig.appendpath mapFolder "Lightmaps/MaxLight/LightmapScene.max"
makeDir (pathconfig.appendpath mapFolder "Lightmaps/MaxLight") all:True
saveMaxFile savePath
LM_log " Importing statics."
local statics_name = pathconfig.appendpath mapFolder "StaticObjects.con"
copyTex:true
bf2ReadStaticObjectsCon statics_name offset:[0,0,0] forLm:True
local statics_name = pathconfig.appendpath mapFolder "StaticObjects.con"
bf2ReadStaticObjectsCon statics_name offset:[0,0,0] forLm:True
copyTex:true
g_bf2Level_levelDir = getFileNamePath statics_name
local objSet = BF2getSceneRootNodes()
if sizefile != undefined then
...
...
scripts/bf2/Statics/importFromGame.ms
View file @
a169058e
...
...
@@ -481,30 +481,34 @@ fn bf2StaticsCopyTextures obj =
(
if classof obj.material == Multimaterial then
(
print "multimat"
for submat in obj.material do
(
local maps
if classof submat == Standard then
if classof submat == Standard
material
then
(
maps = submat.maps
)
m
)
else (
if classof submat == bf2_StaticMesh2 then
(
maps = submat.delegate.maps
)
else
(
continue
))
for map in maps do
(
if map != undefined then
(
filename = pathConfig.appendPath (pathConfig.appendPath (pathConfig.removePathLeaf g_bf2OutModPath) "bf2") map.filename
newname = pathConfig.appendPath maxfilepath "textures"
newname = pathConfig.appendPath maxfilepath "textures"
makeDir newname
newname = pathConfig.appendPath newname (pathConfig.stripPathToLeaf filename)
copyFile filename newname
map.filename = pathConfig.appendPath "textures" (pathConfig.stripPathToLeaf filename)
copyFile filename newname
filename = pathConfig.appendPath g_bf2OutModPath map.filename
copyFile filename newname
map.filename = pathConfig.appendPath "textures" (pathConfig.stripPathToLeaf filename)
)
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment