Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.
pluginDisplayFilter([classification=string], [deregister=boolean], [exists=string], [label=string], [listFilters=boolean], [register=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
pluginDisplayFilter is NOT undoable, queryable, and NOT editable.
Register, deregister or query a plugin display filter.
Plug-ins can use this command to register their own display filters which
will appear in the 'Show' menus on Maya's model panels.
In query mode, return type is based on queried flag.
displayfilter, modeleditor, modelpanel
modelEditor
classification, deregister, exists, label, listFilters, register
Long name (short name) |
Argument types |
Properties |
exists(ex)
|
string
|
|
|
Returns true if the specified filter exists, false otherwise.
Other flags are ignored.
|
|
register(r)
|
boolean
|
|
|
Register a plugin display filter.
The -register is implied if both -register and -deregister flags are missing in create mode.
You are responsible for deregistering any filters which you register.
Filters are reference counted, meaning that if you register the same filter twice
then you will have to deregister it twice as well.
|
|
deregister(dr)
|
boolean
|
|
|
Deregister a plugin display filter.
|
|
label(l)
|
string
|
|
|
The string to be displayed for this filter in the UI. E.g. in the 'Show' menu of a model panel.
The default value of this flag is the same as the plugin display filter name.
|
|
classification(cls)
|
string
|
|
|
The classification used to filter objects in Viewport 2.0.
This classification is the same as MFnPlugin::registerNode().
If the node was registered with multiple classifications, use the one beginning with "drawdb".
The default value of this flag is an empty string (""). It will not
filter any objects in Viewport 2.0.
|
|
listFilters(lf)
|
boolean
|
|
|
Returns an array of all plugin display filters.
|
|
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
# Register a plugin display filter.
#
cmds.pluginDisplayFilter('myDisplayFilter', register = 1, label = 'My Display Filter', classification = 'drawdb/geometry/myShape')
# Deregister a plugin display filter.
#
cmds.pluginDisplayFilter('myDisplayFilter', deregister = 1)
# List all plugin display filters.
#
filters = cmds.pluginDisplayFilter(q = 1, listFilters = 1)
# Query the label of a display filter
#
label = cmds.pluginDisplayFilter('myDisplayFilter', q = 1, label = 1)