[Closed] Renaming with Weak References
Hey guys,
I have an issue with a rig I’m working on. There is a master control object that has an attribute holder with the following code. (Actually I’ve snipped all but the relevant code).
--Parameters
NameParam Type:#String ui:NameString
NameItems Type:#MaxObjectTab tabsizevariable:true tabsize:0
--Interface
Label NameLabel "Name"
Edittext NameString
Button UpdateBtn "Change Name"
--Events
on UpdateBtn Pressed do
(
if Namestring.text != "" do
(
NewName = Namestring.text
for o in NameItems do
(
if (isProperty o.node "MasterControl") then
(
o.node.name = ("! - " + NewName + " - " + o.node.basename)
)
else
(
o.node.name = (NewName + " - " + o.node.basename)
)
)
)
)
All of the objects in the rig have a custom attribute on the node level called “BaseName”.
The problem is whenever I make all the node references to the MaxObjectTab – the file becomes unopenable. I can still merge it, but any time I save, that file becomes unopenable again.
The odd part is that I have done this before, with another rig, and it works fine. I am guessing it has to do with how Sweep references the custom object node?
Can anyone enlighten me as to why this is causing max to crash? I’ve added a zip containing the max file to the scene. Again, if it doesn’t open, just merge it into the scene instead.
Many thanks,
~ Rob
Odd thing. I think it has to do with a recursive error that max isn’t catching and tossing an error for, despite that it should.