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" |
The classification string is also used to determine how Viewport 2.0 will interpret the node.
Category | Classification String |
---|---|
Geometry | "drawdb/geometry" |
Transform | "drawdb/geometry/transform" |
Sub-Scene Object | "drawdb/subscene" |
Shader | "drawdb/shader" |
Surface Shader | "drawdb/shader/surface" |
string[] | Returns the classification strings for the given node type, or an empty array if the node type is not classified. |
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
satisfies(sat)
|
string
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
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")