PDA

View Full Version : Determining the names of Swatch Ports?


Jozvex
10-19-2005, 04:01 AM
Hi guys, I hope my question isn't too exotic.

In Maya 7, Maya now renders swatches for Mental Ray shaders and textures too. It's a very good new addition but it comes with the cost of... being what it is. Working with complicated shading networks and lots of custom MR nodes slows the swatches down a lot (I guess translation may be a big factor), to the point of having to wait a fair few seconds for the AE to load, or for your attribute slider to update, due to the swatch re-rendering. Also, Mental Ray still does as much complaining about different shading things into the command line as if you were rendering the scene.

Anyway, my idea is to create a way to turn the swatches of certain shaders on and off. This is quite easy using the swatchDisplayPort command, only there's one hitch, which is discovering the names of the swatch ports so you can reference them. The script AEswatchDisplay (found in scripts\AETemplates) seems to control everthing about swatches, and it says that all swatches are created with the name swatchDisplay..

So, does that mean to reference a swatch the name would have to be some super long heirarchical name like MayaWindow|ThisThing|ThatControl|ThatLayout|ThatShader|swatchDisplay? Haha. I guess it does, but how do I determine that down to the swatch port itself?

Please, I swear I'm not insane! Can anyone help?

:cry:

CGTalk Moderation
10-19-2005, 04:01 AM
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.