View Full Version : Maya Tutorial [Custom RMB Menus]
mlefevre 07-05-2009, 03:42 PM Hi,
I had quite a few emails asking how to setup custom RMB menus for character controls, so I thought I'd put a video tutorial together for it.
I was supposed to do it months ago, just never got round to it! >.<
Hope you enjoy.
TUTORIAL (http://www.vimeo.com/5459780)
IMPORTANT: Take care not to make any changes to Maya's internal scripts, including dagMenuProc.mel, unless you know exactly what you are doing.
In this tutorial, we are copying the contents of the dagMenuProc.mel script, NOT making any changes to the file itself.
|
|
Xeash
07-06-2009, 07:58 PM
Hi
Nice tut, thanks.
But simply idea: I think your way lack production-readiness. Of course it only a tutorial but I saw the same in your Animatik rig.
I don't know how in your practice, but in mine character referenced in the animation-shot from another, main character scene. So name of your controls will be e.g. "scenename:L_wrist_ctrl". In this situation none of your script nodes will work propely.
Interesting, is there a normal way to do the same thing but do not use "dagMenuProc.mel" at all? i.e. without rewritting maya-interface?
mlefevre
07-06-2009, 08:39 PM
Uh, gee, thanks for the kind words.
Yep, there's better ways of going around it perhaps, this is just one way.
There's a great bit of info from claydough on popUpMenus over on tech-artists for a start, although I don't think it works on anything pre 2008, not 100% on that.
Xeash
07-06-2009, 08:46 PM
yeah I saw that, using prehilite it is not right way I think)
EDIT:
May be using of python API in script node can do the right job...hmm.. If I remember correctly it supported since maya 8.5
BoostAbuse
07-07-2009, 01:25 PM
No need for the Python API really, if referencing names are a concern then you can put in catch statements that query the reference node the object dagHit finds and return it's namespace. If you're dealing with nested references then you can just parse for any parent references or walk through the namespaces and append them to the dagMenu commands.
Good to see more tutorials like this, dagMenuProc is quite a powerful script that I modified a lot working in production and you can pull off some pretty good context based workflows modifying it.
thematt
07-07-2009, 02:39 PM
well if you read the dag menu proc a bit more down there is a check to see if the file is reference or not, so you can already use that in your context..what I do is usually create an extra attr that is hidden, and simply check if it exist or not to popup the new contextual menu, much better in my opinion than checking for a name.
anyway nice tut.
cheers
Xeash
07-08-2009, 03:52 AM
2 BoostAbuse & 2 thematt
No I was talking about how to make the same context menu setup without overriding "dagMenuProc.mel" in the maya scene.That's why I said about using maya python API. Get non-referenced namespaces from referenced nodes is quite easy and there is a lot of way of do this.( I said about referencing earlier as idea how to make mlefevre's setup production-ready)
Some info exists about this here (http://tech-artists.org/forum/showthread.php?t=419) from claydough. He didn't use "dagMenuProc.mel" but he used "ls -preSelectHilite" which is new mel command(since maya 2008 SP if I remember correctly), so what's why I don't like this way.
In opposite maya python API supported (again if I remember correctly) since maya 8.5. May be is possible to make node name check of object below mouse pos. I know that we can use mel command "python" in scene script node for putting python code and even get the results. But is it possible to just override propely without need to write the plugin?
CGTalk Moderation
07-08-2009, 03:52 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.