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
86bd7068
Commit
86bd7068
authored
Sep 29, 2021
by
Harmonikater
Browse files
Fix bf2_howManyLodsDoIHave function
parent
c8769e7c
Pipeline
#8108
passed with stage
in 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scripts/bf2/Statics/lightmapSize_applyFromFile.ms
View file @
86bd7068
...
...
@@ -155,27 +155,34 @@ fn bf2_howManyLodsDoIHave obj geomLevel:0 lodNodes:undefined=
if obj.children.count > geomLevel then
(
local geom =
obj.children[geomLevel+1]
local geom =
getChildWithSubStr obj ("geom" + (geomLevel as string))
if geom == undefined then
(
format "ERROR! bf2_howManyLodsDoIHave()
child #
% does not exist on: %!\n"
obj
(geomLevel
+1)
format "ERROR! bf2_howManyLodsDoIHave()
geom
% does not exist on: %!\n" (geomLevel
) obj
)
else
(
retVal = geom.children.count
if classof lodNodes == array then
if geom.children.count > 0 then
(
lodNodes.count = retVal
for i=1 to retVal do
lodNodes[i] = geom.children[i]
local lod = 0
for child in geom.children do
(
if matchPattern child.name pattern:"lod*" then
(
lod = child.name[4] as integer
if retVal < lod do retVal = lod
if classof lodNodes == array then
(
lodNodes[lod] = child
)
)
)
)
)
)
return retVal
return (retVal+1)
)
fn bf2SaveLMsizesToFile fname =
...
...
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