PDA

View Full Version : Selecting or Testing for a dummy object


Michichael
12-11-2011, 09:00 PM
Hey guys,

I'm trying to work out a Maxscript issue where I'm pulling in FBX objects via an importer. They're exported with the object name [Name] and a root dummy object [Name] where [Name]=[Name].

Now then, I need to rotate the root dummy object 270 degrees. Easy enough, got that part done, but I can't figure out how to select the Dummy object only.

If I select via

getNodeByName [Name]

it returns the mesh. I need the dummy, not the mesh. I'm reading through the MaxScript guide but everything I get seems to return the mesh.

Thoughts?

denisT
12-11-2011, 10:26 PM
I'm trying to work out a Maxscript issue where I'm pulling in FBX objects via an importer. They're exported with the object name [Name] and a root dummy object [Name] where [Name]=[Name].

I can't figure out how to select the Dummy object only.

If I select via

getNodeByName [Name]

it returns the mesh. I need the dummy, not the mesh. I'm reading through the MaxScript guide but everything I get seems to return the mesh.


you didn't read the mxs help carefully. getnodebyname has an optional argument all:
with set this to ON the function returns all nodes with the searched name.
so to get a dummy by name might look as:

for node in getnodebyname <name> all:on where iskindof node dummy do exit with node

Michichael
12-11-2011, 10:34 PM
Thanks! I discounted the all function because it was still returning the original mesh as well. The iskindof is what I was looking for. Thank you.

CGTalk Moderation
12-11-2011, 10:34 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.