How to break input connections for multiple shaders?

How to break input connections for multiple shaders?

Anonymous
Not applicable
700 Views
1 Reply
Message 1 of 2

How to break input connections for multiple shaders?

Anonymous
Not applicable
Hi this is Krishna from India..
I need a suggestion for breaking input connections to multiple shaders and then i wanna to change the attributes "0"

Ex:
for ($break in `ls -sl`){
setAttr ($break + ".color")0;
}
so this will change the attribute of color value. before that i wanna break the input connects of color attribute...
Plz give rply as soon as possible...
0 Likes
701 Views
1 Reply
Reply (1)
Message 2 of 2

lee.dunham
Collaborator
Collaborator
you want the disconnectAttr command if you know where the connections are.
http://download.autodesk.com/us/maya/2011help/Commands/disconnectAttr.html
disconnectAttr ($object + ".outputX") ($break + ".color");


if then you can find out the connections with listConnections.
http://download.autodesk.com/us/maya/2011help/Commands/listConnections.html
listConnections $break ;


or you can use CBdeleteConnection, which is instead a runtimeCommand unlike the previous two and needs to be invoked through the channelBox by right clicking on an attribute and going "Break Connections". You should then be able to use this script.
CBdeleteConnection ($break+".color") ;


Hope that helps.
0 Likes