pymel.core.general.getClassification¶
- getClassification(*args, **kwargs)¶
Returns the classification string for a given node type. Classification strings look like file pathnames (shader/reflectiveor 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/2Dmeans 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: CategoryClassification String2D Texturestexture/2d3D Texturestexture/3dEnv Texturestexture/environmentSurface Materialsshader/surfaceVolumetric Materialsshader/volumeDisplacement Materialsshader/displacementLightslightGeneral Utilitiesutility/generalColor Utilitiesutility/colorParticle Utilitiesutility/particleImage PlanesimageplaneGlowpostprocess/opticalFXThe classification string is also used to determine how Viewport 2.0 will interpret the node. CategoryClassification StringGeometrydrawdb/geometryTransformdrawdb/geometry/transformSub-Scene Objectdrawdb/subsceneShaderdrawdb/shaderSurface Shaderdrawdb/shader/surface
- Modifications:
- previously returned a list with a single colon-separated string of classifications. now returns a list of classifications
rtype: unicode list
- previously returned a list with a single colon-separated string of classifications. now returns a list of classifications
- Modifications:
- supports satisfies flag.
Returns true if the given node type’s classification satisfies the classification string which is passed with the flag.
rtype: bool
- supports satisfies flag.
Returns true if the given node type’s classification satisfies the classification string which is passed with the flag.
Flags:
Long Name / Short Name Argument Types Properties satisfies / sat unicode 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/reflectivesatisfies 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 AHence, shader/reflective/phong:texturesatisfies shader:texture, but shader/reflective/phongdoes not satisfy shader:texture. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.getClassification
Example:
import pymel.core as pm # Get the classification string for the "lambert" node type # classifications = pm.getClassification('lambert') for c in classifications[:]: print '\tClassified as ' + c + '\n' isShader = pm.getClassification("lambert",satisfies="shader")