createMentalRayGlobalsTab.mel for maya 2008 sp1

david | mel script,rendering | Wednesday, March 19th, 2008

I always tell people to never modify the original maya mel scripts. Always make changes to a copy that is in your local scripts folder. This modified copy will over-ride the original maya version.

The downside to this is that when you upgrade to a new version of maya, the modified script may now be out of date, and since it still overrides the newer version, it could cause unpredictable problems.

A while ago I modified createMentalRayGlobalsTab.mel to add the ability to choose a tone mapper when creaing the physical sun/sky environment. After upgrading to maya 2008 sp1 this week I discovered that the "Render Settings" window loaded with an unhelpful error message and was completely blank. It took me a while to realize that my modified createMentalRayGlobalsTab.mel was to blame.

Often when things go wrong after an upgrade people start by removing their prefs folder, but if you have modified mel scripts, try removing them first.

I have updated the createMentalRayGlobalsTab.rar on the downloads page. It now contains a sp1 version as well as the original.

user marking menu hot keys

david | mel script | Thursday, March 13th, 2008

In maya I have a lot of marking menus, several of which are "user marking menus" that I created using the marking menu editor, while others are created dynamically by mel scripts, and all are assigned to hot keys.

What has bugged me for a long time is that some of these marking menus (all of my user marking menus) dont work when I click in a non-viewport window, like the graph editor for example. Today I set up a marking menu for some keyframe editing so I thought I should try to find out how to make it work in the graph editor.

I found the solution by poking around in one of Hamish McKenzie's zoo scripts. Here's what I did...

I created a marking menu, called KeyFrameEdit, with the marking menu editor and specified that it should be available for editing in the Hotkey Editor. Then I opened the Hotkey Editor and located the new marking menu which is listed twice as a command in the User Marking Menus section - KeyFrameEdit_Press and KeyFrameEdit_Release.

I highlighted KeyFrameEdit_Press and assigned alt-j as the hotkey. The following mel code appears in the lower half of the Hotkey Editor.

if (`popupMenu -exists tempMM`) { deleteUI tempMM; }
popupMenu -button 1 -ctl false -alt true -sh false -allowOptionBoxes true -parent viewPanes -mm 1 tempMM;
source "menu_KeyFrameEdit";

The mel command shown is executed when I hold alt-j and left-mouse click in the viewports as expected, but to make it work in the graph editor I had to edit the command in the Hotkey Editor. Here is the result.

string $panel = `getPanel -up`;
if (`popupMenu -exists tempMM`) { deleteUI tempMM; }
if( !`control -ex $panel` ) $panel = "viewPanes";
popupMenu -button 1 -ctl false -alt true -sh false -allowOptionBoxes true -parent $panel -mm 1 tempMM;
source "menu_KeyFrameEdit";

The extra code gets the name of the window the cursor is in and to passes it to the popupMenu command.

cMusclePaint.mel update for maya2008 ext2

david | animation,dj mod,mel script | Saturday, March 8th, 2008

If you downloaded my modified version of cMusclePaint.mel recently and you have since upgraded to maya2008 ext2 then you should download my updated version of cMusclePaint.mel

The cMusclePaint RAR file on the downloads page now contains both versions. Choose the one thats right for you.

one way to customize maya

david | mel script,tutorials | Sunday, March 2nd, 2008

I realise that many of my posts contain references to mel scripts that customize the way maya works, so I thought it could be useful to write some details about how I have configured my maya environment to allow me to customize it without messing up the default installation.

systemPropertiesNewVbl.jpg

Read more...

Powered by WordPress | Based on a theme by Roy Tanck