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

概要

itemFilterType( string , [text=string], [type=boolean])

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

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

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

戻り値

string
string[]

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

フラグ

text, type
ロング ネーム(ショート ネーム) 引数型 プロパティ
type(typ) boolean query
フィルタ オブジェクトのタイプを照会します。戻り値は、itemFilter、attributeFilter、renderFilter、または unknownFilter のいずれかになります。
text(t) string queryedit
フィルタを使用して格納する注釈文字列を定義します。

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

Python の例

import maya.cmds as cmds

#    Create a filter that will pass all spot lights and transforms.
#
filter = cmds.itemFilter(byType=('transform', 'spotLight'))

#    Now query the type of the filter.
#
type = cmds.itemFilterType(filter, q=True, type=True)
print( 'Filter type: ' + type + '\n' )

#    Delete the filter.
#
cmds.delete( filter )