PDA

View Full Version : Writing MEL for Out of Scope ?? More Power !!!


sagunmanandhar
01-09-2011, 11:19 PM
HI,

Is there a way to add Mel command in the list when you right click on any attributes in either attribute editor's attribute???

Maya gives only 5 sets of following commands :
1. Create New Expression..
2. Set Key
3. Set Driven Key
4. Create New Texture
5. Lock Attribute

If this is possible there are lost of power that we can do. like selecting all objects with same attr values....... changing all selected object's attribute at once from attribute editor. etc etc..

pixelranger
01-09-2011, 11:31 PM
Yes.

Seeing that maya's interface is built with mel, most of what you can imagine is possible.

I won't go into the actual mel procedures as I don't have time (also, I can't be bothered as it is a bit of a task), but here are some things you can look into.

Most of the right click menus and also the windows are built using mel procedures in mel scripts found in the Maya directory's scripts/startup folder. i.e. C:\Program Files\Autodesk\Maya2010\scripts\startup

Most of the mel scripts contain procedures for building the menus with entrys found in a file called <menuBuildingMelScript>.res.mel, where <menuBuildingMelScript>.mel is the one building the menu.

If you want to change them, it is a good idea to keep the original one, but save the modified one in
...user\My Documents\maya\2010\scripts (which makes Maya read that one instead on startup).

Customize away. (It can be hard to make it work, though, if you're planning on having context sensitive menu entries, but that is up to you to discover).

sagunmanandhar
01-11-2011, 02:56 PM
Thanks pixelranger
i will try to dig into it. But if you also get some time. please help.

Thanks again

Buexe
01-11-2011, 04:28 PM
You could find out which procedure builds this menu and then edit it to contain whatever you like.

Edit: should have read before posting, please ignore my post.

CGTalk Moderation
01-11-2011, 04:28 PM
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.