View Full Version : command for breaking connection of a shading group???

12 December 2006, 07:08 AM
can you point me in the right direction? i've been trying ot find a comman that I can break the shading group between two nodes but can't figure it out what command I could do this. for example, I want to break the connection between an object and it's shading group.

Thanks for any help you can provide! :)

12 December 2006, 10:21 AM
you can always assign a new material to the object: hyperShade -assign $new_material;

12 December 2006, 10:28 AM
or use: connectAttr -force.....
Its more efficient to force new connections instead breakin and connecting them..

Or do you want to leave the objects without materials?

12 December 2006, 12:57 PM
there's one thing you have to understand:
the hyperShade-command is for "...shader editing in the hypergraph..."

it's a frontend for a command working underneath. that command is most likely

disconnectAttr obj1Attr.a obj2Attr.b ;

question is: what are attribs a and b in this example of shader-un-Assignment?
there are quite of attribs involved, and some of them are not easy to handle,
so to thoroughly disassociate object A from shader B you could do this:

sets -rm blinn1SG pSphereShape1 ;

this removes the poor pSphereShape1 from all shaderAssignment, which is not good.
better it is to just assign something else instead, like e.g. the defaultShader, or any other you like better.

sets -e -forceElement initialShadingGroup pSphere1;


12 December 2006, 07:52 PM
thanks for the help guys, the disconnectAttr is what I needed.

I had tried that before, but wasn't able to get it to work because I was trying to say "delete input connection" or "delete ouput connection" which wasn't working because I wasn't being specific enough.

Thanks again

CGTalk Moderation
12 December 2006, 07:52 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.