Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

shadingNode( node , [asLight=boolean], [asPostProcess=boolean], [asRendering=boolean], [asShader=boolean], [asTexture=boolean], [asUtility=boolean], [isColorManaged=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.

Return value

string(the name of the new node)

Flags

asLight, asPostProcess, asRendering, asShader, asTexture, asUtility, isColorManaged, name, parent
Long name (short name) Argument types Properties
asLight(al) boolean create
classify the current DG node as a light
asPostProcess(app) boolean create
classify the current DG node as a post process
asRendering(ar) boolean create
classify the current DG node as a rendering node
asShader(asShader) boolean create
classify the current DG node as a shader
asTexture(at) boolean create
classify the current DG node as a texture
asUtility(au) boolean create
classify the current DG node as a utility
isColorManaged(icm) boolean create
classify the current DG node as being color managed
name(n) string create
Sets the name of the newly-created node.
parent(p) string create
Specifies the parent in the DAG under which the new node belongs.

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.

Python examples

import maya.cmds as cmds

myShader = cmds.shadingNode('anisotropic', asShader=True)