Go to: Synopsis. Return value. Flags. MEL examples.

Synopsis

itemFilterRender [-anyTextures boolean] [-category string] [-classification string] [-exclusiveLights boolean] [-lightSets boolean] [-lights boolean] [-linkedLights boolean] [-listBuiltInFilters] [-listOtherFilters] [-listUserFilters] [-negate boolean] [-nonExclusiveLights boolean] [-nonIlluminatingLights boolean] [-parent string] [-postProcess boolean] [-renderUtilityNode boolean] [-renderableObjectSets boolean] [-shaders boolean] [-text string] [-textures2d boolean] [-textures3d boolean] [-texturesProcedural boolean] name

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.

Return value

stringThe filter name.

In query mode, return type is based on queried flag.

Flags

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 createqueryedit
This flag can be used to cause the filter to invert itself, and reverse what passes and what fails.
-parent(-p) string createqueryedit
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 createqueryedit
Defines an annotation string to be stored with the filter
-category(-cat) string createqueryeditmultiuse
A string for categorizing the filter.
-classification(-cls) string createqueryedit
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) query
Returns an array of all item filters with classification "builtIn".
-listUserFilters(-luf) query
Returns an array of all item filters with classification "user".
-listOtherFilters(-lof) query
Returns an array of all item filters with classification "other".
-shaders(-s) boolean createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 createqueryedit
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 be used more than once in a command.

MEL examples

//    If an object is a shader or any type of texture, it will pass
//    this filter.
//
string $shadersAndTextures = `itemFilterRender -shaders true -anyTextures true`;

//    If an object is not a 3d Texture, it will pass this filter.
//
string $no3dTextures = `itemFilterRender -negate true -textures3d true`;

//    A couple more filters.  One showing only lights, the other showing
//    everything but lights.
//
string $lights = `itemFilterRender -lights true`;
string $noLights = `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.
//
string $window = `window`;
string $form = `formLayout`;
string $editor = `outlinerEditor -showDagOnly false`;
string $column = `columnLayout -adjustableColumn true`;
button -label "No Filter"            -command ("outlinerEditor -edit -filter \"\" $editor");
button -label "Shaders and Textures" -command ("outlinerEditor -edit -filter $shadersAndTextures $editor");
button -label "No 3D Textures"       -command ("outlinerEditor -edit -filter $no3dTextures $editor");
button -label "Lights"               -command ("outlinerEditor -edit -filter $lights $editor");
button -label "No Lights"            -command ("outlinerEditor -edit -filter $noLights $editor");
string $input = `selectionConnection -worldList`;
editor -edit -mainListConnection $input $editor;

//    Apply the layout attachments.
//
formLayout -edit
    -attachForm    $column "top"    0
    -attachForm    $column "left"   0
    -attachForm    $column "bottom" 0
    -attachNone    $column "right"
    -attachForm    $editor "top"    0
    -attachControl $editor "left"   0 $column
    -attachForm    $editor "bottom" 0
    -attachForm    $editor "right"  0
    $form;

//    Put some objects in the scene.
//
spotLight;
pointLight;
shadingNode -asTexture bulge;
shadingNode -asTexture checker;
shadingNode -asTexture granite;
shadingNode -asTexture wood;
shadingNode -asShader lambert;
shadingNode -asShader blinn;

showWindow $window;