Skip to content

Commit

Permalink
Fix error when closing param window in Max 2009
Browse files Browse the repository at this point in the history
  • Loading branch information
pudingus committed Jun 25, 2020
1 parent ec35566 commit cdb07a0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 24 deletions.
26 changes: 13 additions & 13 deletions mafia_4ds/export_mafia_4ds.ms
Original file line number Diff line number Diff line change
Expand Up @@ -320,19 +320,19 @@ fn CollectObjects = (
qsort mobj.portals CompareNames
)

if debug then (
local id = 0
for mobj in mobjSet.mobjects do (
format "\n%: % ot:% vt:%" id mobj.baseNode.name mobj.objectType mobj.visualType
for lodd in mobj.lods do (
format "\n %" lodd.name
)
for prtl in mobj.portals do (
format "\n %" prtl.name
)
id = id + 1
)
)
-- if debug then (
-- local id = 0
-- for mobj in mobjSet.mobjects do (
-- format "\n%: % ot:% vt:%" id mobj.baseNode.name mobj.objectType mobj.visualType
-- for lodd in mobj.lods do (
-- format "\n %" lodd.name
-- )
-- for prtl in mobj.portals do (
-- format "\n %" prtl.name
-- )
-- id = id + 1
-- )
-- )

mobjSet
--mobjects
Expand Down
27 changes: 16 additions & 11 deletions mafia_4ds/param_editor.ms
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ global MafParamEditor
)

on MafParamEditor close do (
print "close"
--print "close"
callbacks.removeScripts #selectionSetChanged id:#selChangedID
callbacks.removeScripts #nodeRenamed id:#nodeRenamedID
)
Expand Down Expand Up @@ -364,8 +364,8 @@ global MafParamEditor
)


local start = timestamp()
local end = timestamp()
--local start = timestamp()
--local end = timestamp()
fn OnSelectionChanged =
(
local obj = selection[1]
Expand Down Expand Up @@ -451,9 +451,7 @@ global MafParamEditor
fn OnNodeRenamed = (
OnSelectionChanged()
)

callbacks.addScript #selectionSetChanged "OnSelectionChanged()" id:#selChangedID
callbacks.addScript #nodeRenamed "OnNodeRenamed()" id:#nodeRenamedID


local title = "4DS Params"

Expand All @@ -471,9 +469,16 @@ global MafParamEditor
floater = newRolloutFloater title 190 460
)

addRollout MafParamEditor floater
addRollout ObjectRoll floater
for c in ObjectRoll.controls do c.visible = false

OnSelectionChanged()
if floater.open then (
callbacks.addScript #selectionSetChanged "OnSelectionChanged()" id:#selChangedID
callbacks.addScript #nodeRenamed "OnNodeRenamed()" id:#nodeRenamedID

addRollout MafParamEditor floater
addRollout ObjectRoll floater

for c in ObjectRoll.controls do c.visible = false

OnSelectionChanged()
)

)

0 comments on commit cdb07a0

Please sign in to comment.