View Full Version : maxscript : detect link between geometry
12-23-2008, 12:44 PM
I'm writing my first max script but I'm stuck at the point of detecting a link between 2 objects (geometry).
The script basically write to an xml file some info about the scene.
I take the selection and write each item to the file. so now I want to add link info.
how can I detect if an object is linked to an other, get the other object's name and detect what's there relation (parent-child) ?
hope I make myself clear ,
12-24-2008, 11:57 PM
I think this is what you're asking, to find out an objects parent is as simple as the .parent
Sphere01.parent would return the parent of that object
Sphere01.children would return the children of that object
if object.children.count > 0 then print "object has children"
if object.parent != undefined then print "object has parent"
12-27-2008, 01:58 PM
keep in mind that this only works for static links and not 'links' established via a Link Constraint
Or the more esotheric, "I swear those we're linked" links.
12-27-2008, 02:30 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.