View Full Version : Hiding Shaders
Im trying to make a script that will allow a user to hide a shader from the hypershade (not with bins). I have been trying to figure out how the hypershade window/editor works but so far i cant get it. I can find the editor that I need to filter but when i attach a filter to it it simply doesnt work. nothing happens. this is weird becasue if i attach the same filter to an outliner window it does work. I think it has to do with how the hypershade rebuids/refreshes but im not sure. also I assumed that the hypershade editor is controlled by a selectiionconnection but it doesnt seem to be and if it is not than what controls it? Hope this makes sense. Any help would be apreciated. Also any ideas on how to get the same result through a different method would also be appreciated.
No ideas? I could use any help.
11-23-2006, 08:27 PM
Played around, had same problem. Even if you use the hypershade filter, it seems like re-running the same code through mel gives different results (i.e. the script editor's echo all isn't quite echoing all!)
So no idea.
I know its kinda avoiding the issue, but why not use a bin for all your shaders you want hidden?
12-05-2006, 12:24 PM
I came across the problem once that shading nodes I created with "createNode" (like "createNode lambert") are not listed in the hypershade and couldnīt find a way to include them afterwards. So this is a trick to hide them, however inreversible yet ;-)
12-05-2006, 01:36 PM
There are several record keeping nodes in Maya that determine whether a given node is visible in the hypershade and under which tab it is displayed.
Materials have to be connected to the defaultShaderList1.s attribute
Textures have to be connected to the defaultTextureList1.tx attribute
Utilities have to be connected to the defaultRenderUtilityList1.u attribute
Lights have to be connected to the lightList1.l attribute
To make a connection:
connectAttr -na blinn1.msg defaultShaderList1.s;
To break a connection:
disconnectAttr -na blinn1.msg defaultShaderList1.s;
After breaking the connection if you refresh the hypershade your material should disappear from the top-half - it will still be visible in the workarea, though.
12-05-2006, 02:05 PM
Thanks a lot, thatīs exactly what I had been looking for.
Okay, Adam, seems like you got a solution ;)
12-05-2006, 02:05 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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.