SelectMembers

導入

v1.0

カテゴリ

選択

詳細

グループのメンバを選択します。

注: SelectionList 引数にエラーが含まれる場合、コマンドは失敗します。

スクリプト構文

oReturn = SelectMembers( [SelectionList], [AffectSelectionList], [CheckObjectSelectability] );

戻り値

SelectFlagがFalseの場合、メンバを含むXSICollectionを戻します。

パラメータ

パラメータ タイプ 詳細
SelectionList 文字列 グループのリスト

デフォルト値: 現在選択されている値

AffectSelectionList ブール オブジェクトを選択する場合は True、オブジェクトのリストを戻す場合は False

デフォルト値: True

CheckObjectSelectability ブール 選択不可としてマーキングされたオブジェクトを選択するかどうかを指定します。

デフォルト値: False

指定可能な値:

説明:

False 選択不可としてマーキングされたオブジェクトも選択します。
True 選択不可としてマーキングされたオブジェクトは選択しません。

VBScript の例

' The following creates a first group with a cone and a cylinder
' and a second group with a sphere and a torus
' Then we use SelectMembers to select the members of the first group.
' Then we use SelectMembers to get the members of the second group,
' then display their name without selecting them.
NewScene
CreatePrim "Cone", "MeshSurface"
CreatePrim "Cylinder", "MeshSurface"
Translate , 6.53800806588704, 0.470281530755438, -4.70281530755438E-02, _
                siRelative, siView, siObj, siXYZ, , , siXYZ
AddToSelection "cone,cylinder", , True
CreateGroup
CreatePrim "Sphere", "MeshSurface"
Translate , -11.6949439857416, -2.78124277037914, -2.24299813358391, _
                siRelative, siView, siObj, siXYZ
CreatePrim "Torus", "MeshSurface"
Translate , -5.04010305375909, -6.50115497576114, 2.00167060127099, _
                siRelative, siView, siObj, siXYZ
AddToSelection "sphere", , True
CreateGroup
DeselectAll
SelectObj "Group"
SelectMembers , True
logMessage "cone and cylinder (members of the first group)"
logMessage "should be selected now"
set members = SelectMembers( "Group1", False )
logMessage "Group1 members are: " & members
' The output of the previous logMessage should be 
' INFO : Group1 members are: "torus,sphere"