View Full Version : float script
abahena 08-26-2008, 12:53 AM 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
|
|
distract
08-26-2008, 01:18 AM
Maybe using the node ID helps. Look for:
id = $.inode.handle
maxops.getNodeByHandle id
julian
RobGalanakis
08-26-2008, 01:46 AM
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).
LoneRobot
08-26-2008, 04:13 PM
if it is in a float script controller you can use a weak reference by specifying a node in the controller dialog.
abahena
08-27-2008, 10:59 PM
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.
CGTalk Moderation
08-27-2008, 10:59 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.