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

概要

itemFilter [-byBin string] [-byName string] [-byScript string] [-byType string] [-category string] [-classification string] [-clearByBin] [-clearByType] [-difference string string] [-exists] [-intersect string string] [-listBuiltInFilters] [-listOtherFilters] [-listUserFilters] [-negate boolean] [-parent string] [-secondScript string] [-text string] [-union string string] [-uniqueNodeNames boolean] [string]

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

指定した項目フィルタ オブジェクトを作成するためのコマンドです。このオブジェクトは selectionConnection オブジェクトやエディタにアタッチして、これらのオブジェクトやエディタを通過する項目リストをフィルタすることができます。論理和(Union)、論理積(Intersection)および論理差(Difference)フィルタを使用して、複雑な合成フィルタを作成することができます。

戻り値

string
string[]

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

フラグ

byBin, byName, byScript, byType, category, classification, clearByBin, clearByType, difference, exists, intersect, listBuiltInFilters, listOtherFilters, listUserFilters, negate, parent, secondScript, text, union, uniqueNodeNames
ロング ネーム(ショート ネーム) 引数型 プロパティ
-exists(-ex) create
指定したオブジェクトが存在するかどうかによって、 true または false を返します。他のフラグは無視されます。
-byName(-bn) string createqueryedit
指定した正規表現の文字列と一致する名前を持つ項目だけがフィルタを通過します。この文字列には、特殊文字「*」と「?」を含めることができます。「?」は任意の 1 文字のキャラクタに相当し、「*」は任意の従属文字列に相当します。
-byType(-bt) string createqueryeditmultiuse
指定した文字列と一致する typeName を持つ項目だけがフィルタを通過します。オブジェクトの typeName を検索するには、nodeType コマンドを使用します。これは多目的フラグです。 1 つのコマンドでこのフラグが複数回使用されている場合、指定したタイプ(つまり、論理和、論理タイプ、またはそのほかの指定したタイプ)と最低 1 つ一致するノードはフィルタを通過できます。
-clearByType(-cbt) createedit
このフラグにより、このフィルタとコネクトされている既存の typeName がすべて消去されます。
-byBin(-bk) string createqueryeditmultiuse
このフィルタは、bin リストに bin 名として指定した文字列が含まれている項目だけを通します。
これは多目的フラグです。
1 つのコマンドでこのフラグが複数回使用されている場合、指定した bin(つまり、論理和、論理 bin、またはその他の指定した bin)と最低 1 つ一致するノードはフィルタを通過できます。
-clearByBin(-cbk) createedit
このフラグにより、このフィルタにコネクトされている既存の bin がすべてクリアされます。
-byScript(-bs) string createqueryedit
フィルタにより、指定した文字列で各項目に対して、MEL スクリプトが実行されます。スクリプトから 0 以外の値が返された場合、項目はフィルタを通過します。 スクリプト名の文字列は、次のシグネチャを持つ proc 名でなければなりません。
global proc int procName( string $name )
-secondScript も同時に使用すると、必ず -secondScript が優先されることに注意してください。
-secondScript(-ss) string createqueryedit
-bs フラグと併用します。2 番目のスクリプトは、リスト全体を個々にではなく、同時にフィルタリングするためのものです。このシグネチャは次のようになります。
global proc string[] procName( string[] $name )
これは項目のリストを取り込み、フィルタした項目のリストを返します。
-union(-un) string string createqueryedit
このフィルタは、指定した文字列の名前を持つ 2 つのフィルタの論理和(Union)で構成されます。 含まれているフィルタの最低 1 つを通過できる項目は、このフィルタを通過できます。
-intersect(-in) string string createqueryedit
このフィルタは、指定した文字列の名前を持つ 2 つのフィルタの論理積(Intersection)で構成されます。 これに含まれる両方のフィルタを通過できる項目のみ、このフィルタを通過できます。
-difference(-di) string string createqueryedit
このフィルタは、名前が指定した文字列である 2 つの他のフィルタの論理差(Difference)で構成されます。 項目は、1 番目のフィルタを通過して 2 番目のフィルタは通過しないときかつそのときに限り、このフィルタを通過します。
-negate(-neg) boolean createqueryedit
このフラグはフィルタ自身を反転させたり、 通過するものと通過しないものを逆転したりするために使用できます。
-parent(-p) string createqueryedit
オプションです。指定すると、フィルタのライフスパンが その親のライフスパンに関連付けられます。親が範囲を逸脱すると、フィルタも範囲を逸脱します。指定されていない場合、 フィルタは明示的に削除されるまで存在しつづけます。
-text(-t) string createqueryedit
フィルタを使用して格納する注釈文字列を定義します。
-category(-cat) string createqueryeditmultiuse
フィルタを分類するための文字列です。
-classification(-cls) string createqueryedit
内部でのみ使用されます。フィルタが組み込みフィルタであるか、ユーザ定義フィルタであるかを指定します。文字列引数は「builtIn」、「user」、「other」のいずれかになります。
-listBuiltInFilters(-lbf) query
「builtIn」に分類されている項目フィルタすべての配列を返します。
-listUserFilters(-luf) query
「user」に分類されている項目フィルタすべての配列を返します。
-listOtherFilters(-lof) query
「other」に分類されている項目フィルタすべての配列を返します。
-uniqueNodeNames(-unn) boolean createqueryedit
ネーミング コンフリクトが起こらないように、固有のノード名をスクリプト フィルタに返します。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : 1 つのコマンドで複数回使用可能なフラグ

MEL 例

//    Create a filter that will pass all transforms.
//
string $transforms = `itemFilter -byType transform`;

//    Create a filter that will pass all spot lights.
//
string $spotLights = `itemFilter -byType spotLight`;

//    There are two ways to create a filter that passes both
//    spot lights and transforms.  You can create a filter
//    that is a union of the previous two or just specify
//    both object types on one filter.
//
string $unionFilter = `itemFilter -union $transforms $spotLights`;
string $spotLightsAndTransforms = `itemFilter
    -byType transform -byType spotLight`;

//    Create a filter that lists all objects beginning with the
//    letter "a".
//
string $aFilter = `itemFilter -byName "a*"`;

//    Create a filter that lists only transforms and spot lights
//    that begin with the letter "a".
//
string $intersectionFilter = `itemFilter
    -intersect $spotLightsAndTransforms $aFilter`;

//    Delete the filters when done with them.
//
delete $transforms $spotLights $aFilter;
delete $unionFilter $intersectionFilter;