インタフェース > コア インタフェース > refhierarchy |
refhierarchy コア インタフェースは、MAXScript に参照階層へのアクセスを提供します。
Interface: refhierarchy
メソッド:
<boolean>refhierarchy.IsRefTargetInstanced <maxObject>refTarget
このメソッドは、オブジェクトがインスタンスされている(インスタンスされたパイプライン)かどうかを確認するために使用します。
このメソッドは、派生オブジェクトがインスタンスされているかどうかをチェックします。インスタンスされている場合は、派生オブジェクトを含むパイプライン部分以降がインスタンスされます。
一部のオブジェクトでは、インスタンスであるかどうかの情報が必要になることがあります。一部のプラグインでは、その ModContext バウンディング ボックスのサイズと位置を正しく解釈するために、この機能が必要になることがあります。
maxObject がインスタンスである場合は True 、そうでない場合は False を返します。
引数が undefined の場合にも、 False を返します。
例 |
--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 |