CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 03-23-2013, 02:44 AM   #1
theJackson
Veteran
portfolio
jackson five
no Company
Jersey
 
Join Date: Nov 2011
Posts: 66
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?
 
Old 03-23-2013, 06:31 AM   #2
djx
Where's my pony?
 
djx's Avatar
David Johnson
vfx & creature td
Melbourne, Australia
 
Join Date: Jun 2003
Posts: 3,389
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.

David
__________________
http://www.djx.com.au
 
Old 03-23-2013, 08:30 AM   #3
theJackson
Veteran
portfolio
jackson five
no Company
Jersey
 
Join Date: Nov 2011
Posts: 66
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?
 
Old 03-23-2013, 12:40 PM   #4
djx
Where's my pony?
 
djx's Avatar
David Johnson
vfx & creature td
Melbourne, Australia
 
Join Date: Jun 2003
Posts: 3,389
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.

David
__________________
http://www.djx.com.au
 
Old 03-24-2013, 04:15 PM   #5
theJackson
Veteran
portfolio
jackson five
no Company
Jersey
 
Join Date: Nov 2011
Posts: 66
finally got the solution `lsUI`. thankYou djx for encouragement, i`m your fan, bye!
 
Old 03-24-2013, 04:15 PM   #6
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 09:16 AM.


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