Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone I am debutant in mel script and I can not find my mistake. I just wanted to add the word "H_" in front of Lambert's name, but he said I had an error. Do you know where this can come from?
string $refPoly[] = `ls -selection`;
string $Mname = ( "H_" + $refPoly ) ;
string $material = `shadingNode -asShader lambert -name $Mname`;
string $SG = `sets -renderable true -noSurfaceShader true -empty -name "refMaterialSG"`;
connectAttr -f ( $material + ".outColor" ) ( $SG + ".surfaceShader" );
select -r $refPoly[0];
hyperShade -assign $material;
Solved! Go to Solution.