Notifications
Clear all
[Closed] maxscript : detect link between geometry
Dec 23, 2008 12:44 pm
hi,
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 ,
grtz
4 Replies
Dec 23, 2008 12:44 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
Dec 23, 2008 12:44 pm
if object.children.count > 0 then print "object has children"
if object.parent != undefined then print "object has parent"
Cheers,
-Johan
Dec 23, 2008 12:44 pm
keep in mind that this only works for static links and not ‘links’ established via a Link Constraint