移動先: 概要 戻り値 フラグ. Python 例.
itemFilterRender(
name
, [anyTextures=boolean], [category=string], [classification=string], [exclusiveLights=boolean], [lightSets=boolean], [lights=boolean], [linkedLights=boolean], [listBuiltInFilters=boolean], [listOtherFilters=boolean], [listUserFilters=boolean], [negate=boolean], [nonExclusiveLights=boolean], [nonIlluminatingLights=boolean], [parent=string], [postProcess=boolean], [renderUtilityNode=boolean], [renderableObjectSets=boolean], [shaders=boolean], [text=string], [textures2d=boolean], [textures3d=boolean], [texturesProcedural=boolean])
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
itemFilterRender は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。
指定した renderTypeFilter オブジェクトを作成するためのコマンドです。このオブジェクトは selectionConnection オブジェクトやエディタにアタッチして、これらのオブジェクトやエディタを通過する renderType リストをフィルタすることができます。論理和(Union)や論理積(Intersection)フィルタを使用して、
複雑な合成フィルタを作成できます。
戻り値の型は照会モードでは照会フラグが基になります。
anyTextures, category, classification, exclusiveLights, lightSets, lights, linkedLights, listBuiltInFilters, listOtherFilters, listUserFilters, negate, nonExclusiveLights, nonIlluminatingLights, parent, postProcess, renderUtilityNode, renderableObjectSets, shaders, text, textures2d, textures3d, texturesProcedural
ロング ネーム(ショート ネーム) |
引数型 |
プロパティ |
negate(neg)
|
boolean
|
 
|
|
このフラグはフィルタ自身を反転させたり、
通過するものと通過しないものを逆転したりするために使用できます。
|
|
parent(p)
|
string
|
 
|
|
オプションです。指定すると、フィルタのライフスパンが
その親のライフスパンに関連付けられます。親が範囲を逸脱すると、フィルタも範囲を逸脱します。指定されていない場合、
フィルタは明示的に削除されるまで存在しつづけます。
|
|
text(t)
|
string
|
 
|
|
フィルタを使用して格納する注釈文字列を定義します。
|
|
category(cat)
|
string
|
  
|
|
classification(cls)
|
string
|
 
|
|
内部でのみ使用されます。フィルタが組み込みフィルタであるか、ユーザ定義フィルタであるかを指定します。文字列引数は「builtIn」、「user」、「other」のいずれかになります。
|
|
listBuiltInFilters(lbf)
|
boolean
|
|
|
「builtIn」に分類されている項目フィルタすべての配列を返します。
|
|
listUserFilters(luf)
|
boolean
|
|
|
「user」に分類されている項目フィルタすべての配列を返します。
|
|
listOtherFilters(lof)
|
boolean
|
|
|
「other」に分類されている項目フィルタすべての配列を返します。
|
|
shaders(s)
|
boolean
|
 
|
|
true に設定されている場合、シェーダ オブジェクトを通過させます。デフォルト値は false です。シェーダ以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して、結果を逆転させます。
|
|
anyTextures(at)
|
boolean
|
 
|
|
true に設定されている場合、テクスチャ オブジェクトを通過させます。デフォルト値は false です。テクスチャ以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して、結果を逆転させます。
|
|
textures2d(t2d)
|
boolean
|
 
|
|
true に設定されている場合、2D テクスチャ オブジェクトを通過させます。デフォルト値は false です。2 次元テクスチャ以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して結果を逆転させます。
|
|
textures3d(t3d)
|
boolean
|
 
|
|
true に設定されている場合、3D テクスチャ オブジェクトを通過させます。デフォルト値は false です。3 次元テクスチャ以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して結果を逆転させます。
|
|
lights(l)
|
boolean
|
 
|
|
true に設定されている場合、ライト オブジェクトを通過させます。デフォルト値は false です。ライト以外のオブジェクトをすべて取得するには、このフラグを true に設定し、
-neg/negate フラグを使用して結果を逆転させます。
|
|
postProcess(pp)
|
boolean
|
 
|
|
true に設定されている場合、ポスト プロセス オブジェクトを通過させます。デフォルト値は false です。ポスト プロセス オブジェクト以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して、結果を逆転させます。
|
|
renderUtilityNode(run)
|
boolean
|
 
|
|
true に設定されている場合、
レンダー ユーティリティ ノード オブジェクトを通過させます。デフォルト値は false です。レンダー ユーティリティ ノード以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して結果を逆転させます。
|
|
exclusiveLights(exl)
|
boolean
|
 
|
|
true に設定されている場合、排他ライト オブジェクトを通過させます。デフォルト値は false です。排他ライト以外のオブジェクトをすべて取得するには、このフラグを true に設定し、
-neg/negate フラグを使用して結果を逆転させます。
|
|
linkedLights(ll)
|
boolean
|
 
|
|
true に設定されている場合、関連付けられたライト オブジェクトを通過させます。デフォルト値は false です。関連付けられたライト以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して結果を逆転させます。
|
|
lightSets(ls)
|
boolean
|
 
|
|
true に設定されている場合、ライト設定オブジェクトを通過させます。デフォルト値は false です。ライト設定オブジェクト以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して結果を逆転させます。
|
|
nonIlluminatingLights(nil)
|
boolean
|
 
|
|
true に設定されている場合、イルミネートされていないライト オブジェクトを通過させます。デフォルト値は false です。イルミネートされていないライト以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して結果を逆転させます。
|
|
nonExclusiveLights(nxl)
|
boolean
|
 
|
|
true に設定されている場合、排他ではないライト オブジェクトを通過させます。デフォルト値は false です。排他ではないライト以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して結果を逆転させます。
|
|
renderableObjectSets(ros)
|
boolean
|
 
|
|
true に設定されている場合、レンダリング可能なオブジェクト セットを通過させます。デフォルト値は false です。レンダリング可能なオブジェクトセット以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して結果を逆転させます。
|
|
texturesProcedural(tp)
|
boolean
|
 
|
|
true に設定されている場合、プロシージャ テクスチャ オブジェクトを通過させます。デフォルト値は false です。プロシージャ テクスチャ オブジェクト以外のオブジェクトをすべて取得するには、
このフラグを true に設定し、-neg/negate フラグを使用して結果を反転させます。
|
|
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: タプルまたはリストとして渡された複数の引数を持てるフラグ
|
import maya.cmds as cmds
# If an object is a shader or any type of texture, it will pass
# this filter.
#
# If an object is not a 3d Texture, it will pass this filter.
#
no3dTextures = cmds.itemFilterRender(negate=True, textures3d=True)
# A couple more filters. One showing only lights, the other showing
# everything but lights.
#
lights = cmds.itemFilterRender(lights=True)
noLights = cmds.itemFilterRender(lights=True, negate=True)
# Create a window with an outliner editor, along with some buttons that
# will apply a different filter to the outliner.
#
window = cmds.window()
form = cmds.formLayout()
editor = cmds.outlinerEditor(showDagOnly=False)
column = cmds.columnLayout(adjustableColumn=True)
cmds.button( label='No Filter', command='cmds.outlinerEditor("'+editor+'", edit=True, filter="")')
cmds.button( label='Shaders and Textures', command='cmds.outlinerEditor("'+editor+'", edit=True, filter="'+shadersAndTextures+'")')
cmds.button( label='No 3D Textures', command='cmds.outlinerEditor("'+editor+'", edit=True, filter="'+no3dTextures+'")')
cmds.button( label='Light', command='cmds.outlinerEditor("'+editor+'", edit=True, filter="'+lights+'")')
cmds.button( label='No Light', command='cmds.outlinerEditor("'+editor+'", edit=True, filter="'+noLights+'")')
input = cmds.selectionConnection(worldList=True)
cmds.editor( editor, edit=True, mainListConnection=input )
# Apply the layout attachments.
#
cmds.formLayout(form, edit=True,
attachForm=((column, 'top', 0), (column, 'left', 0),
(column, 'bottom', 0), (editor, 'top', 0),
(editor, 'bottom', 0), (editor, 'right', 0)),
attachNone=(column, 'right'),
attachControl=(editor, 'left', 0, column))
# Put some objects in the scene.
#
cmds.spotLight()
cmds.pointLight()
cmds.shadingNode( 'bulge', asTexture=True )
cmds.shadingNode( 'checker', asTexture=True )
cmds.shadingNode( 'granite', asTexture=True )
cmds.shadingNode( 'wood', asTexture=True )
cmds.shadingNode( 'lambert', asShader=True )
cmds.shadingNode( 'blinn', asShader=True )
cmds.showWindow( window )