restore shelf after maya 2012 physX plugin load

david | dj mod,mel script | Monday, April 11th, 2011

Maya 2012 came with a nice looking dynamics plugin called physX and it creates a shelf when it loads.

physxShelf.jpg

However I don't like the way this becomes the active shelf every time I start maya. I suppose I could unload the plugin, but then I'll have to reload it every time I need it. Fortunately physX uses mel scripts to initialize the plugin and create the shelf, so I modified one called physxUI.mel and added some code to re-select the shelf that was active before physX loaded.

If you are fussy about your active shelf and want to give the mod a try get physxUI.mel from my downloads page and drop it in your local scripts folder.

update: I tried this fix on another computer and it did not work. I'm not sure if I got lucky with the first one or unlucky with the 2nd. I think that success or failure has something to do with the order that maya does things at startup. Based on that theory. I've changed my modification slightly, so you'll need to download it again. And there is now an extra requirement: In addition to dropping the new physxUI.mel mod into your local scripts folder, you must also add the following line to your userSetup.mel

source physxUI.mel; storePreviousShelf();

This is now working on every computer I've tested it on. Yes. Both of them!

7 Comments »

  1. Hello,

    Thanks for this script, but it does not work for me (Maya 2012 x64 - no more thing in userSetup.mel)
    Bye

    TsuTmĀµ

    Comment by tsu3d — May 16, 2011 @ 8:04 pm

  2. Do you get an error message? I do not understand your comment about userSetup.mel
    If you give me a few more details, then maybe I can help you.

    Comment by david — May 16, 2011 @ 10:55 pm

  3. Hi,

    Works great - nice little tweak for an annoyance. The DMM plugin (new revision) one-ups the PHYSX one by hijacking the hotbox and adding its own custom commands. They can be removed with "hotBox -cst false;" (no quotes) though I have not found a way to do this at run-time in my usersetup.mel (the DMM plugin does not use mel to initialize). What's up with all of these agressive plugins?!

    -N

    Comment by nbreslow — July 14, 2011 @ 4:20 am

  4. Hey thanks for the tip and the warning Nick. I hate the way these plugins create shelves and invade menus with no obvious way to disable their behavior. In a production environment you want to have some control over the way the interface appears to specific users, and these aggressive plugins mess things up.

    Comment by david — July 16, 2011 @ 5:35 pm

  5. it's a procedure??

    Comment by rickshaw — September 22, 2011 @ 6:50 am

  6. ? what's the matter? i can leave comments?

    Comment by rickshaw — September 22, 2011 @ 6:52 am

  7. all product less than 50$, in site: shoestoreau

    Comment by rickshaw — September 22, 2011 @ 6: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