Hi, this code is modified by bodizz (he gave me the blinn command ) but I want to add lambert material also so I changed in the Blinn material command. After changing the blinn command they both are working as a Lambert command or lambert material how can I make it unique.
proc createMat(){
string $sel[] = `ls -sl`;
string $myBlinn = `shadingNode -asShader blinn`;
select -r $sel;
hyperShade -assign $myBlinn;
}
window;
frameLayout -label "jayant";
flowLayout -columnSpacing 7 -w 50 -h 50;
symbolButton -w 40 -h 40 -image "blinn.svg" -c "createMat()" ;
proc createMat(){
string $sel[] = `ls -sl`;
string $lambert = `shadingNode -asShader lambert`;
select -r $sel;
hyperShade -assign $lambert;
}
flowLayout -columnSpacing 7 -w 40 -h 38;
symbolButton -w 40 -h 40 -image "blinn.svg" -c "createMat()" ;
showWindow;
Replies
// Use the $name variable to create a material of that type; eg blinn, lambert, surfaceShader, etc.
Now in your symbolButton lines, change to... -c "createMat("lambert")";
It does nothing when I change it to blinn
proc createBlinn(string $blinn){
symbolButton -w 40 -h 40 -image "blinn.svg" -c "createMat("blinn")" ;
symbolButton -w 40 -h 40 -image "blinn.svg" -c "createMat("lambert")" ;
I know this stuff can be hard, but you really need to put a bit more thought into what you're doing.