ScriptSpot

Forum topic · General Scripting

detect link between geometry

By yourself · 2008-12-23

Description

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

Comments (1)

masquerade · 2008-12-23

Hi,

.parent property is what you are looking for.

for example

$box01.parent

-- returns the parent object of Box01 object. if there isnt any, it is undefined.

you can use a if clause to test if it is parented or not.