Go to: Synopsis. Return value. Flags. Python examples.
shadingNode( node , [asLight=boolean], [asPostProcess=boolean], [asRendering=boolean], [asShader=boolean], [asTexture=boolean], [asUtility=boolean], [name=string], [parent=string])
Note: Strings representing object names and
arguments must be separated by commas. This is not depicted in the
synopsis.
shadingNode is undoable, NOT queryable, and NOT
editable.
The shadingNode command classifies any DG node as a shader, texture
light, post process, or utility so that it can be properly
organized in the multi-lister. Recall that any DG node can be used
a part of a a shader, texture or light - regardless of how it is
classified by this. command. These classifications are provided for
convenience in the UI.
string |
(the name of the new node) |
asLight, asPostProcess, asRendering, asShader, asTexture, asUtility, name,
parent
Long name (short name) |
Argument types |
Properties |
name(n) |
string |
|
|
Sets the name of the newly-created node. |
|
parent(p) |
string |
|
|
Specifies the parent in the DAG under which the new node
belongs. |
|
asShader(asShader) |
boolean |
|
|
classify the current DG node as a shader |
|
asTexture(at) |
boolean |
|
|
classify the current DG node as a texture |
|
asLight(al) |
boolean |
|
|
classify the current DG node as a light |
|
asPostProcess(app) |
boolean |
|
|
classify the current DG node as a post process |
|
asUtility(au) |
boolean |
|
|
classify the current DG node as a utility |
|
asRendering(ar) |
boolean |
|
|
classify the current DG node as a rendering node |
|
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
myShader = cmds.shadingNode('anisotropic', asShader=True)