sp0rk3d
10-08-2008, 09:46 PM
// Warning: line 92: Node 'pSphereShape2.instObjGroups[0]': cannot make assignment to 'blinn2SG' shader. //
// Error: line 92: Connection not made: 'pSphereShape2.instObjGroups[0]' -> 'blinn2SG.dagSetMembers[-1]'. Source node will not allow the connection. //
// Error: line 92: Error while parsing arguments. //
when i run my script i am getting this error and i am not sure why.
i am trying to duplicate a material and assign it to a duplicate object....
i have 2 arrays one with the duplicate objects the other with the corisponding materials...
everything up to here is working as it should...
from here on i am not sure if i am doing the right thing....
// this part is supposed to create a SG then attach the mat to the SG then assign the mat to an object
string $SG =`createNode shadingEngine -n ($material+"SG")`;
connectAttr -f ($material+".outColor") ($SG+".surfaceShader");
sets -e -forceElement $SG $object[$i];
this is where the script errors out
// Error: line 92: Connection not made: 'pSphereShape2.instObjGroups[0]' -> 'blinn2SG.dagSetMembers[-1]'. Source node will not allow the connection. //
// Error: line 92: Error while parsing arguments. //
when i run my script i am getting this error and i am not sure why.
i am trying to duplicate a material and assign it to a duplicate object....
i have 2 arrays one with the duplicate objects the other with the corisponding materials...
everything up to here is working as it should...
from here on i am not sure if i am doing the right thing....
// this part is supposed to create a SG then attach the mat to the SG then assign the mat to an object
string $SG =`createNode shadingEngine -n ($material+"SG")`;
connectAttr -f ($material+".outColor") ($SG+".surfaceShader");
sets -e -forceElement $SG $object[$i];
this is where the script errors out
