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

Synopsis

surfaceShaderList [-add name] [-remove name]

surfaceShaderList is undoable, queryable, and editable.

Add/Remove a relationship between an object and the current shading group.

Return value

None

In query mode, return type is based on queried flag.

Flags

add, remove
Long name (short name) Argument types Properties
-add(-add) name create
add object(s) to shader group list.
-remove(-rm) name create
remove object(s) to shader group list.

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 be used more than once in a command.

MEL examples

// Create a NURBS plane.
nurbsPlane -d 3 -p 0 0 0 -lr 1 -axis 0 0 0 -n plane1;

// Make it red.
sets -name redMaterialGroup -renderable true -empty;
shadingNode -name redShader -asShader phong;
setAttr -type double3 redShader.color 1 0 0;
surfaceShaderList -add redMaterialGroup redShader;
sets -e -forceElement redMaterialGroup plane1;