PDA

View Full Version : automatically change a color


babu
02-18-2010, 07:02 PM
hi all :beer:

i am new there and have simple problem

i try to assign automatically some shader to selected objects and return previous to deselected, there is a my code :

//=======================================

int $jobNum1 = `scriptJob -cc "SomethingSelected" setShader -protected`;

proc setShader()
{
string $slCtrl[] = `ls -sl`;
string $old[];
if (isParentOf ("group1", $slCtrl[0]))
{
sets -e -forceElement lambert2SG;
}
if (!size($slCtrl[0]))
{
sets -e -forceElement lambert3SG $old[0];
}
$old= $slCtrl;
}

//=====================================


but it`s not working and where is a error please help :banghead: :banghead: :banghead:

CGTalk Moderation
02-18-2010, 07:02 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.