Go to: Synopsis. Return value. Flags. Python examples.
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])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
itemFilterRender is undoable, queryable, and editable.
This command creates a named renderTypeFilter object. This object can
be attached to selectionConnection objects, or to editors, in order to
filter the renderType lists going through them. Using union and
intersection filters, complex composite filters can be created.
In query mode, return type is based on queried flag.
anyTextures, category, classification, exclusiveLights, lightSets, lights, linkedLights, listBuiltInFilters, listOtherFilters, listUserFilters, negate, nonExclusiveLights, nonIlluminatingLights, parent, postProcess, renderUtilityNode, renderableObjectSets, shaders, text, textures2d, textures3d, texturesProcedural
Long name (short name) |
Argument types |
Properties |
negate(neg)
|
boolean
|
 
|
|
This flag can be used to cause the filter to invert itself,
and reverse what passes and what fails.
|
|
parent(p)
|
string
|
 
|
|
Optional. If specified, the filter's life-span is linked to
that of the parent. When the parent goes out of scope, so
does the filter. If not specified, the filter will exist
until explicitly deleted.
|
|
text(t)
|
string
|
 
|
|
Defines an annotation string to be stored with the filter
|
|
category(cat)
|
string
|
  
|
|
A string for categorizing the filter.
|
|
classification(cls)
|
string
|
 
|
|
Internal use only. Indicates whether the filter is a built-in
or user filter. The string argument is one of "builtIn" | "user" | "other".
|
|
listBuiltInFilters(lbf)
|
boolean
|
|
|
Returns an array of all item filters with classification "builtIn".
|
|
listUserFilters(luf)
|
boolean
|
|
|
Returns an array of all item filters with classification "user".
|
|
listOtherFilters(lof)
|
boolean
|
|
|
Returns an array of all item filters with classification "other".
|
|
shaders(s)
|
boolean
|
 
|
|
Pass shader objects if set to true. Value is false
by default. To get all objects that are not shaders then
set this flag to true and use the -neg/negate flag to invert
the result.
|
|
anyTextures(at)
|
boolean
|
 
|
|
Pass texture objects if set to true. Value is false
by default. To get all objects that are not textures then
set this flag to true and use the -neg/negate flag to invert
the result.
|
|
textures2d(t2d)
|
boolean
|
 
|
|
Pass 2D texture objects if set to true. Value is false
by default. To get all objects that are not 2D textures then
set this flag to true and use the -neg/negate flag to invert
the result.
|
|
textures3d(t3d)
|
boolean
|
 
|
|
Pass 3D texture objects if set to true. Value is false
by default. To get all objects that are not 3D textures then
set this flag to true and use the -neg/negate flag to invert
the result.
|
|
lights(l)
|
boolean
|
 
|
|
Pass light objects if set to true. Value is false
by default. To get all objects that are not lights then
set this flag to true and use the -neg/negate flag to invert
the result.
|
|
postProcess(pp)
|
boolean
|
 
|
|
Pass post process objects if set to true. Value is false
by default. To get all objects that are not post processes then
set this flag to true and use the -neg/negate flag to invert
the result.
|
|
renderUtilityNode(run)
|
boolean
|
 
|
|
Pass render utility node objects if set to true. Value is
false by default. To get all objects that are not render utility nodes
then set this flag to true and use the -neg/negate flag to invert
the result.
|
|
exclusiveLights(exl)
|
boolean
|
 
|
|
Pass exclusive light objects if set to true. Value is false
by default. To get all objects that are not exclusive lights then
set this flag to true and use the -neg/negate flag to invert
the result.
|
|
linkedLights(ll)
|
boolean
|
 
|
|
Pass linked light objects if set to true. Value is false
by default. To get all objects that are not linked lights then
set this flag to true and use the -neg/negate flag to invert
the result.
|
|
lightSets(ls)
|
boolean
|
 
|
|
Pass light set objects if set to true. Value is false
by default. To get all objects that are not light sets then
set this flag to true and use the -neg/negate flag to invert
the result.
|
|
nonIlluminatingLights(nil)
|
boolean
|
 
|
|
Pass non-illuminating light objects if set to true. Value is
false by default. To get all objects that are not non-illuminating
lights then set this flag to true and use the -neg/negate flag
to invert the result.
|
|
nonExclusiveLights(nxl)
|
boolean
|
 
|
|
Pass non-exclusive light objects if set to true. Value is
false by default. To get all objects that are not non-exclusive
lights then set this flag to true and use the -neg/negate flag
to invert the result.
|
|
renderableObjectSets(ros)
|
boolean
|
 
|
|
Pass renderable object sets if set to true. Value is
false by default. To get all objects that are not renderable object
sets then set this flag to true and use the -neg/negate flag
to invert the result.
|
|
texturesProcedural(tp)
|
boolean
|
 
|
|
Pass procedural texture objects if set to true. Value is
false by default. To get all objects that are not procedural
textures then set this flag to true and use the -neg/negate flag
to invert the result.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
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 )