changing/deleting sub menuItems command

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  03 March 2013
changing/deleting sub menuItems command

how do i edit the command for Freeze Transformations from makeIdentity to some other global procedure that i created?
and how do i delete some useless submenu items like "quit" in file menu?
  03 March 2013
Turn on echo all commands in the script editor history menu.
Select something from the menu you wish to change.
Look at the commands that get echoed.
Do some detective work - "whatIs" will be your friend.

whatIs ModObjectsMenu;
// Result: Mel procedure found in: C:/Program Files/Autodesk/Maya2013/scripts/startup/ModObjectsMenu.mel //

Open in a text editor and see where it leads you.

If you are going to actually change something, do it in a local copy of the script and set up your environment so that your local copy overrides the installed copy. There are many way's to do this. I wont go into it now.

  03 March 2013
i did: whatIs FreezeTransformations;
i got: // Result: Presumed Mel procedure; no definition seen yet. // where can i access that presumed procedure so that i could modify it?
  03 March 2013
I hope you did not stop there
If you want to get in under the hood of maya and mess with the engine then be prepeared to look for clues and join the dots. Maya is mostly a bunch of mel scripts. Many of then are small scripts. It is not uncommon when you look for something to follow a path through 10 different scripts to get to the few lines that actually do the work. Sometimes you will get lucky and it will be obvious and it will be a single script and the command will be echoed in the script editor. But in may cases you'll just see the names of procs that are several layers above the command you are looking for.

When I did freeze transforms from the menu I saw "ModObjectsMenu" mentioned. Since it was reasonable to assume that the freeze transforms command was being called by the script that builds the "modify" menu, then something called ModObjectsMenu looked like a good place to start. So I did a whatIs on that.

Keep trying. If you want it badly enough you'll find it. Either that or you can just turn off the menu and make a custom shelf with your custom commands. Or a custom marking menu. Thats what I'd probably do.

  03 March 2013
finally got the solution `lsUI`. thankYou djx for encouragement, i`m your fan, bye!
  03 March 2013
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 09:30 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.