toggle hypershade thumbnail updates

david | dj mod,mel script | Friday, July 4th, 2008

A few weeks ago I saw this thread on cgtalk where Matt Estela offered a workaround for the slowness that we experience when using the hypershade when complex shaders or shaders with large file textures are involved. The update lag seems worse if some of the new mia shaders are involved. Matt's workaround is to simply disable the thumbnail updates while you are changing attribute values and to re-enable the updates again later when its more convenient.

I spent some time modifying a maya2008 sp1 mel script called hyperShadePanel.mel to add Matt's suggested workaround to a new button. Its the one with the little green shader ball icon in the center collumn as shown here

thumbnailUpdatesToggleButton.jpg

You can use it to toggle thumbnail updates on and off. You'll get one of those purple warnings in the info window to tell you the update state has changed.

warningMessage.jpg

You can download my modified version with the button icons from my downloads page. Put hyperShadePanel.mel in your local scripts folder and the xpm files in your icons folder and you'll get the new button when you restart maya.

Download here.

I previously uploaded an earlier mod version soon after reading the cgtalk post, but the button behavior was slightly awkward. This has been corrected now, so this note is for anybody who tried it before - its better now.

20 May 2011 update: I've added a version that works in maya 2012. The rar file now includes the new mel and 2 new png bitmaps for 2012.

12 Comments »

  1. hi
    very nice type, and much practical than a shell with just 02 commands!
    renderThumbnailUpdate 0;
    renderThumbnailUpdate 1;
    bon courage!
    /Rachid

    Comment by rachid — July 4, 2008 @ 10:55 am

  2. Thanks for the comment Rachid, but I'm not exactly sure what you mean. It seems you are just restating the two commands that Matt Estela wrote about on cgtalk. (Forgive me if I am misinterpreting this)

    In response to Johannes Dalheimer's (aka maxwater) follow-up question in the cgtalk thread, I integrated those commands into the hypershade UI so that we have a toggle button that provides visual feedback as to its current state. To me this is more convenient than having to type them into the shell.

    regards
    David

    Comment by david — July 6, 2008 @ 7:48 pm

  3. yes exactly you are interpreting me right !
    /Rachid

    Comment by rachid — July 6, 2008 @ 11:53 pm

  4. Thanks David this is great.

    We have experienced this problem as well. It really does not help that the mia hardware swatch does not obey the texture node load state (ie if you set a texture to not load in the the texture node because you know it is very large and will slow hypershade down). This is a bug that I have already posted with Autodesk, but had no answer on. This is a great work around though. thanks.

    Comment by acirillo — July 7, 2008 @ 9:21 am

  5. WOW, thanks a lot man! This update is a life saver for us!
    I tried finding the command that trigger the swatch refresh some time ago but couldn't find anything.

    Your script modification is perfect!

    Thanks for this great contribution!

    Comment by kobayashy — August 21, 2008 @ 4:43 am

  6. can it use in Maya2009~~~~~??

    i try it in maya2009?but it can't work~~~~

    this is the imformation?

    // Error: string $filterMenu = filterUICreateMenuSub($hs, $m, 0);
    //
    // Error: Wrong number of arguments on call to filterUICreateMenuSub. //
    // Error: Fur::executeCommand MayaState: (kFailure): Unexpected Internal Failure //
    ...
    // Error: Object not found: mainRenderMenu. //

    Comment by anyheart — October 15, 2008 @ 12:34 am

  7. Hi anyheart, the version you tried is only for maya2008. I have now added a 2009 version to the download which should work ok.

    Comment by david — October 15, 2008 @ 6:29 pm

  8. Thanks David ~~~~

    ^_^~~

    Comment by anyheart — October 16, 2008 @ 2:03 am

  9. Any chance of an update for maya 2012 ?? - its a killer for this. Thanks for all the scripts, they've been saving me allot!

    ~MSK

    Comment by MSK — May 18, 2011 @ 7:01 am

  10. I'd forgotten about this one - until now!
    I've just added it to the rar file. The bitmaps need to be .png for 2012 (and these are also in the rar).

    Comment by david — May 20, 2011 @ 12:32 am

  11. Your timing is impecable and this script indispensable. I had the 2009 version running on 2010 no problem. The new script worked perfectly on 2011.

    Very nice to not be constantly updating little balls that give me little to no information.

    Thanks MSK for asking the update question and thanks David for your ingenuity.

    Comment by sundevildave — May 21, 2011 @ 8:52 am

  12. Thanks a ton, David. Just install this script on Maya 2012 and it works like a charm and help greatly on efficiency for my scene.

    - Jason

    Comment by jasonhuang1115 — July 29, 2011 @ 3:53 am

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress | Based on a theme by Roy Tanck