Go to: Synopsis. Return value. Related. Flags. Python examples.
getClassification(
string
, [satisfies=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
getClassification is undoable, NOT queryable, and NOT editable.
Returns the classification string for a given node type.
Classification strings look like file pathnames ("shader/reflective" or "texture/2D", for
example). Multiple classifications can be combined into a single compound
classification string by joining the individual classifications with ':'.
For example, the classification string "shader/reflective:texture/2D" means
that the node is both a reflective shader and a 2D texture.
The classification string is used to determine how rendering nodes
are categorized in various UI, such as the Create Render Node and HyperShade
windows:
Category | Classification String |
2D Textures | "texture/2d" |
3D Textures | "texture/3d" |
Env Textures | "texture/environment" |
Surface Materials | "shader/surface" |
Volumetric Materials | "shader/volume" |
Displacement Materials | "shader/displacement" |
Lights | "light" |
General Utilities | "utility/general" |
Color Utilities | "utility/color |
Particle Utilities | "utility/particle" |
Image Planes | "imageplane" |
Glow | "postprocess/opticalFX" |
string[] | Returns the classification strings for the given node type, or
an empty array if the node type is not classified. |
addAttr, aliasAttr, attributeInfo, deleteAttr, listNodeTypes, nodeType, objExists, objectType, renameAttr
satisfies
Long name (short name) |
Argument types |
Properties |
satisfies(sat)
|
string
|
|
|
Returns true if the given node type's classification satisfies the classification
string which is passed with the flag.
A non-compound classification string A is said to satisfy a non-compound
classification string B if A is a subclassification of B (for example,
"shaders/reflective" satisfies "shaders").
A compound classification string A satisfies a compound classification
string B iff:
- every component of A satisfies at least one component of B and
- every component of B is satisfied by at least one component of A
Hence, "shader/reflective/phong:texture" satisfies "shader:texture", but
"shader/reflective/phong" does not satisfy "shader:texture".
|
|
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
# Get the classification string for the "lambert" node type
#
classifications = cmds.getClassification('lambert')
for c in classifications[:]:
print '\tClassified as ' + c + '\n'
isShader = cmds.getClassification("lambert",satisfies="shader")