PDA

View Full Version : getNodeByName, System Exception


MikieK
08-23-2011, 02:19 AM
Greetings

I'm getting some wierdness with getting Nodes by Name, and am having troube pinning down the cause.

I basically have some dynamically created objects which I freeze, and hide or unhide depending on various calculations. When these objects are no longer needed, they are deleted.

What I am running into is something is messing up those nodes internally, and I'm not sure what.

My Script would fail on

sph1 = getnodeByName (nodestring + "_a1")

I started to troubleshoot this in the listener and got the following

getnodeByName ("9_6" + "_a1")
** system exception **

$9_6_a1
** system exception **

I Then selected the object using the select by name toolbar tool. and in the listener typed:

$
$GeoSphere:9_6_a1 @ [-3552.035645,-2436.765137,7019.664063]

If I save and restart max, I can select this object normally again...

Anyone else ever run into something similar?

(running 3ds max 2012 64 bit)

Cheers

Mikie

PiXeL_MoNKeY
08-23-2011, 03:07 AM
What if you wrap it in single quotes? Your name violates the valid naming conventions for maxscript. Refer to the maxscript help on names here (http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/files/GUID-1C428A1F-3638-4DAC-812C-C6EBAE2100A-385.htm).Names set in single quotes allow you to write names that contain illegal identifier characters, such as spaces and other punctuation. They are primarily intended for specifying 3ds Max object classes and properties that have special characters in their names.-Eric

MikieK
08-23-2011, 03:25 AM
What if you wrap it in single quotes? Your name violates the valid naming conventions for maxscript. Refer to the maxscript help on names here (http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/files/GUID-1C428A1F-3638-4DAC-812C-C6EBAE2100A-385.htm).-Eric

Of couse!!! Will add a leading character and see if that clears it up...

Indeed that seems to have sorted it out... I would have expected to see an error much earlier on with an invalid object name, so didn't even think twice about it...

by the way, apparently tried to give you props, but
"You must spread some Reputation around before giving it to PiXeL_MoNKeY again."

thanks ;)

PiXeL_MoNKeY
08-23-2011, 03:52 AM
No problem, I am here to do what I can to help others, not to get reputation. Though thank you for trying.

-Eric

CGTalk Moderation
08-23-2011, 03:52 AM
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.