Thursday, October 10, 2013

Quick Tip: Hypershade Icons toggle

By now I'm sure you're all using the node editor to create and work with your shaders in maya , but for those of you who are still using that clunky old  hypershade  ESC just posted a quick tip for toggling the icons in it to help speed things up..

 This is something I've been using forever , as it can make a huge difference in speed .. It seems that anytime you can tell the ui in maya to be quite, you get a big speed burst. 


 But, of course pre- Python in maya, the code I use is MEL .   so I thought I'd share it here. its super simple, and not much to it.. and of course you can add to it develop in further if you wish.

 code:

renderThumbnailUpdate (!`renderThumbnailUpdate -q`);



Just put that on your shelf and it works as a toggle to turn the hypershade icons off if they are on, and on if they are off.



I'll let ESC share their tip with you for using Python in maya to do the exact same thing.
 ( be sure to check out their other quick tips as they are also super helpful)








Python Code from ESC :

import maya.cmds as cmds
swatchState= cmds.renderThumbnailUpdate(q=True)
if swatchState == 0:
cmds.renderThumbnailUpdate (1)
print("\nSwatches turned ON")
else:
cmds.renderThumbnailUpdate (0)
print("\nSwatches turned OFF")

No comments: