ScriptSpot

Forum topic · General Scripting

Check if object is an instance

By Chman · 2007-03-21

Description

Hi,

I can't seem to find a way to check if an object is an instance or not. I know I can use InstanceMgr.getInstances to get the number of instances for the specified object, but it's not what I'm looking for. RefHierarchy.isRefTargetInstanced is more like what I want, except it returns true for every instanced objects, even the "original" one (from which other objects are instanced). Is this normal ? The same goes for references...

Is there a way to get only instanced objects without the original one ?

I hope you'll understand what I mean,

Thanks

Comments (2)

vasilescu_anton · 2007-08-28

You can consider the original one the one you select first in order to get all it's instances...

mantis3d · 2007-03-24

For instance objects, there is no "original" one. Everyone is same.

If you want find the first one, maybe ".handle" property can help you