pymel.core.rendering.shadingNode

shadingNode(*args, **kwargs)

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.

Flags:

Long Name / Short Name Argument Types Properties
asLight / al bool ../../../_images/create.gif
  classify the current DG node as a light
asPostProcess / app bool ../../../_images/create.gif
  classify the current DG node as a post process
asRendering / ar bool ../../../_images/create.gif
  classify the current DG node as a rendering node
asShader / asShader bool ../../../_images/create.gif
  classify the current DG node as a shader
asTexture / at bool ../../../_images/create.gif
  classify the current DG node as a texture
asUtility / au bool ../../../_images/create.gif
  classify the current DG node as a utility
isColorManaged / icm bool ../../../_images/create.gif
  classify the current DG node as being color managed
name / n unicode ../../../_images/create.gif
  Sets the name of the newly-created node.
parent / p unicode ../../../_images/create.gif
  Specifies the parent in the DAG under which the new node belongs. Flag can have multiple arguments, passed either as a tuple or a list.
shared / s bool  
   
skipSelect / ss bool  
   

Derived from mel command maya.cmds.shadingNode

Example:

import pymel.core as pm

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