移動先: 概要 戻り値 フラグ. Python 例.

概要

stringArrayIntersector( string , [allowDuplicates=boolean], [defineTemplate=string], [exists=boolean], [intersect=[string,...]], [reset=boolean], [useTemplate=string])

注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。

stringArrayIntersector は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。

stringArrayIntersecto コマンドは、大きな文字配列を効率よくインターセクトすることを可能にする オブジェクトを作成および編集します。インターセクタ オブジェクトは、「これまでのインターセクト」の情報を維持し、 新しい文字配列が -i/intersect フラグを使用して与えられたときに、 インターセクトを更新します。

文字列の部門(インターセクタ)オブジェクトは、deleteUI コマンドを使用して削除できる場合があります。

戻り値

stringインターセクタの名前。

戻り値の型は照会モードでは照会フラグが基になります。

フラグ

allowDuplicates, defineTemplate, exists, intersect, reset, useTemplate
ロング ネーム(ショート ネーム) 引数型 プロパティ
exists(ex) boolean create
指定したオブジェクトが存在するかどうかによって、 true または false を返します。他のフラグは無視されます。
defineTemplate(dt) string create
他の任意のフラグと引数を解析し、かつ引数で指定したコマンド テンプレートに 追加するモードに、コマンドのモードを変更します。 templateName がカレントのテンプレートとして設定されていれば、 その後コマンドが実行されるたびに、この引数がデフォルトの引数として使用されます。
useTemplate(ut) string create
コマンドに、カレント以外のコマンド テンプレートの使用を強制します。
allowDuplicates(ad) boolean create
インターセクタを入力配列で複製させる(true)か、 またはすべての複製エントリを単一の固有エントリに結合する(false)必要があります。 このフラグは、インターセクタを初めて作成する場合に使用する必要があります。 デフォルトは false です。
intersect(i) [string,...] createedit
インターセクタによって維持されている現在のインターセクトによって、 指定した文字配列をインターセクトします。
reset(r) boolean edit
インターセクタをリセットし、新しいインターセクトを開始します。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : タプルまたはリストとして渡された複数の引数を持てるフラグ

Python 例

import maya.cmds as cmds

# Create an intersector
#
myIntersector = cmds.stringArrayIntersector('stringArrayIntersector')

# Intersect some string arrays using the intersector
#
initialArray = ['Excellent', 'Smithers', 'doh']
cmds.stringArrayIntersector( myIntersector, edit=True, intersect=initialArray )
cmds.stringArrayIntersector( myIntersector, edit=True, intersect=['Smithers', 'Homer'] )

# Query the intersector to see what the intersection is so far
#
cmds.stringArrayIntersector( myIntersector, query=True )
# Result: Smithers #

# Reset the intersector so that you can use it again with new string
# arrays
#
cmds.stringArrayIntersector( myIntersector, edit=True, reset=True )

# Delete the intersector as we are now done with it
#
cmds.deleteUI( myIntersector )