Interface: refhierarchy
The refhierarchy Core Interface provides MAXScript access to the reference hierarchy.
Interface: refhierarchy
Methods:
<boolean>refhierarchy.IsRefTargetInstanced <maxObject>refTarget
This method can be used to find out if an object is instanced (instanced pipeline).
It Checks if the Derived Object is instanced. If it is, the pipeline part below and including that derived object is instanced.
In certain circumstances, objects need to find out whether they are instances or not. Some plugins need this functionality in order to properly interpret the size and position of their ModContext bounding box.
Returns True
if the maxObjectis an instance, False
otherwise.
If the argument is undefined, it also returns False
.
FOR EXAMPLE
--see if undefined returns anyting - it returns false: refhierarchy.IsRefTargetInstanced undefined --> false --create a box - it is not instanced: b1 = box() --> $Box:Box01 @ [0.000000,0.000000,0.000000] refhierarchy.IsRefTargetInstanced b1 --> false --create an instance of the box: b2 = instance b1 --> $Box:Box02 @ [0.000000,0.000000,0.000000] --check the firstbox - it is now an instance refhierarchy.IsRefTargetInstanced b1 --> true --as is the second box: refhierarchy.IsRefTargetInstanced b2 --> true --create a bend modifier and see if it is instanced - it is not: theMod = Bend() --> Bend:Bend refhierarchy.IsRefTargetInstanced theMod --> false --add the Bend modifier to the one box addModifier b1 theMod --> OK --the modifier is still not instanced: refhierarchy.IsRefTargetInstanced theMod --> false --now create a sphere and add the same bend modifier to it: s1 = sphere() --> $Sphere:Sphere01 @ [0.000000,0.000000,0.000000] addModifier s1 theMod --> OK --now the modifier is instanced: refhierarchy.IsRefTargetInstanced theMod --> true