Go to: Synopsis. Return value. MEL examples.

Synopsis

setDefaultShadingGroup string

setDefaultShadingGroup is undoable, queryable, and NOT editable.

The setDefaultShadingGroup command is used to change which shading group is considered the current default shading group. Subsequently created objects will be assigned to the new default group.

Return value

None

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

MEL examples

// Create a new blue shader
$blinn = `shadingNode -asShader blinn`;
setAttr ($blinn+".color") -type double3 0.15 0.35 1.0 ;
$blinnSG = `sets -renderable true -noSurfaceShader true -empty -name blinnSG`;
connectAttr -force ($blinn+".outColor") ($blinnSG+".surfaceShader");

// Make it the default
setDefaultShadingGroup $blinnSG;