[Closed] float script
I have this problem. When I rename the object that is pointing my script, it give and error because I change the name.
Is there a way to avoid this?
Thank you
Maybe using the node ID helps. Look for:
id = $.inode.handle
maxops.getNodeByHandle id
julian
Just assign it to a variable? If I understood your question right, this is a very essential aspect of coding to understand…
b = box name:"myBox"
$Box:myBox @ [0.000000,0.000000,0.000000]
$myBox.name = "notMyBox"
"notMyBox"
b.name
"notMyBox"
When you refer to ‘b’ in your script, you are actually referring to the data is was assigned to (the box you made in the first line).
You should rarely use names to refer to your objects unless you have direct control over them (such as temporarily created objects).
if it is in a float script controller you can use a weak reference by specifying a node in the controller dialog.
Im using the same object, like 3 times on the scene and the float script is the same on each object but independient behavior.
When I merge the file and autorename the objects the script wont work anymore.