MEL + Shading Group Error

Hi Folks,

Am a beginner in MEL. Recently I came across a video tutorial which am referring to learn MEL. Here’s the code –>

Code:

//- some code goes before this..

// create shading nodes
shadingNode -asShader lambert -n "petalColor";
shadingNode -asTexture ramp -n "petalRamp";

// shading group is connected via Sets
sets -renderable true -noSurfaceShader false
        -empty -n petalColorSG;

// Connect to color attribute
connectAttr -f petalColor.outColor petalColorSG.sufaceShader;
connectAttr petalRamp.outColor petalColor.color;

//- some code goes after this..


this is the error am getting after running the script :

// Error: The destination attribute ‘petalColorSG.sufaceShader’ cannot be found.

I have petalColor created in Material Editor & petalColorSG created in Shading group editor.

What could be the problem guys? :confused:

Thanks in advance.

No Responses to “MEL + Shading Group Error”

Post a Comment