PDA

View Full Version : Any way to modify the built-in marking menus?


pixlix2
01-14-2006, 12:29 PM
Hello everyone,

I'm wondering if I can somehow add menu items to the built-in MMs like the one for the creation of primitives (have nothing selected, then hold shift + RMB).
I really would like to add some stuff, like a locator for example.

Many thanks for your help!

yann22
01-14-2006, 12:36 PM
Here's a nice little video on the subject:

http://www.simplymaya.com/movie_pages/tutorial.mhtml?tut_id=44

cheers

pixlix2
01-14-2006, 03:07 PM
Hi RabbitRun,

thanks for the link. The video was pretty useful to recap all about the procedure of modifying "normal" marking menus - But I meant the ones that do not appear in the Marking Menu Editor (to make that clearer in my intial post, I edited the thread title now).
There are many MMs that do not appear there and they are all context sensitive.

But now, after searching and searching in many mel scripts in the maya directory i managed to change some of them. So I'm pretty happy now!

It's all a bit more difficult than i thought. I will try to explain the procedure to change entries in the poly primitive menu I mentioned in my first post - maybe someone finds this useful. What I did was changing the "Poly Disk"-entry to a "Locator"-Entry:
http://i33.photobucket.com/albums/d60/pixlix/MM.gif

Many of the MEL-Scripts for those context-sensitive MMs are in this path
X:\Maya7Path\scripts\others

and the interesting ones are the few with "context*" at the beginning.
contextPolyToolsMM.mel seems to be the one that decides which kind of marking menu has to be displayed for the current selection. So for example when you have nothing selected it will launch the poly creation menu I'm talking about. This menu is build by "PolyToolsDefaultMM.mel". In this file there is a main function that's called:

global proc contextPolyToolsDefaultMM(){
// and here is all the code for the marking menu !
}

Now you have two options: You can edit it right there or you can use Maya's MarkingMenu-Editor. For the latter you need to copy the marking menu code out of the function and put it into a new file like "menu_Temp.mel" (the "menu" prefix is mandatory!). This file has to be placed into your user folder, something like:
c:\documents and settings\user\my documents\maya\7.0\prefs\markingMenus\

Now finally you can do the changes with the MMeditor! :) But of course, after you are finished, you have to copy the generated code back into the function in "PolyToolsDefaultMM.mel"! (and restart maya)

Phew, that's all ;)

pixlix2
01-15-2006, 12:04 PM
I'm starting to believe no one cares about changing the default MMs :)
Anyway, I was bored and tried to make the poly creation MM a "bit" more universal. It's not perfect maybe it's even just too much. Time will show.
http://i33.photobucket.com/albums/d60/pixlix/MM2.gif
http://rapidshare.de/files/11087827/contextPolyToolsDefaultMM.mel.html

bye

Iconoklast
01-15-2006, 04:01 PM
I made a quick video that details modifying the context sensitive marking menus that you might also want to take a look at: It's at:
http://www.final3.com/html/contextMMVideo.htm

pixlix2
01-15-2006, 07:06 PM
Wow, I'm speechless, 20 minutes hard to find info.
That was really really helpful and very well done! I've learned alot!
I hope there will be more people interested in a second video than just me :)

Now I'm wondering how one could change the subcomponent M. Menu that appears when you just right click over a poly object for example (without modifier keys). I could not find it in the ModelEdMenu.mel...I hardly remember that someone in this (or another) forum made some changes to it, like giving access to the pivot point (aside from vertex, edge, face, etc)...
Anyway,
many thanks!

Iconoklast
01-15-2006, 09:38 PM
That's a little more complicated because the file you need to edit is dagMenuProc.mel which is a rather large script, and the marking menu creation there is based on several arrays, so essentially, you can't really just add a few menuItems without having to mess around with other things. But there is that script (which adds the pivot point option) that might point you in the right direction: http://www.3dbe.com/PivotNow.html

thatoneguy
01-16-2006, 12:47 AM
Is there anyway to create icons w/ transparency for the marking menu? I would love to ripoff Discreet Toxic's Radial menu design, or at least have happy little buttons to stare back at me while I'm working all day.

http://images.autodesk.com/adsk/images/TOXIK_reaction_gate0.jpg

I like the idea of transparent marking menus to be less in the way.

pixlix2
01-16-2006, 02:51 AM
I believe there is a plugin/script (?) that allows you to display icons instead of text in the marking menus. But I doubt these icons support an alpha channel :), unfortunately i forgot the name of the script, maybe someone else knows...

On the other hand a MM is intended to be used QUICKLY, often so quick that it not even appears. That's why I don't think that it is really an issue that it blocks the view, but I can understand you anyway - sure, that Toxic menu looks pretty cool :)

Iconoklast
01-16-2006, 06:23 AM
yeah, they're called xtools at: www.maya-xtools.com, I believe you can find a maya 6/6.5 version on highend3d.

CGTalk Moderation
01-16-2006, 06:23 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.