Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / How to break input connections for multiple shaders?
  RSS 2.0 ATOM  

How to break input connections for multiple shaders?
Rate this thread
 
62477
 
Permlink of this thread  
avatar
  • Location: Hyderabad
  • Total Posts: 38
  • Joined: 13 November 2010 05:06 AM

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…



Krishna

Replies: 0
avatar
  • ldunham1
  • Posted: 02 December 2011 11:03 PM

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.



Lee Dunham | Character TD
ldunham.blogspot.com

Replies: 0