userSetup.mel

userSetup.mel

Anonymous
Not applicable
1,224 Views
2 Replies
Message 1 of 3

userSetup.mel

Anonymous
Not applicable

Hello!

 

I am trying to create a userSetup.mel file that when Maya starts up it has only the Curve selection mask turned on and all the others turned off. As an animator, I have to do this manually every single time I start Maya so I figured it should be relatively straightforward to just use a userSetup.mel that will do this for me. Unfortunately, I am not having any luck getting it to work. I am not a programmer and just used the Echo All commands in the Script Editor to copy and paste code. This is what I have:

 

// Turns of all pick masks
setObjectPickMask "All" 0;
updateObjectSelectionMasks;
updateComponentSelectionMasks;
dR_selTypeChanged("");;
// Turns on Curves pick mask
setObjectPickMask "Curve" true;
updateObjectSelectionMasks;
updateComponentSelectionMasks;
dR_selTypeChanged("");

 

Any help on getting this to work would be greatly appreciated!! Thanks in advance!

Accepted solutions (1)
1,225 Views
2 Replies
Replies (2)
Message 2 of 3

stuzzz
Collaborator
Collaborator
Accepted solution

Please try this one.

evalDeferred "setObjectPickMask \"All\" 0; selectType -nurbsCurve true;"

BTW, you may probably need to setup a hotkey rather than changing the userSetup for this pupose.

0 Likes
Message 3 of 3

Anonymous
Not applicable

Ok Great, I will give it a shot.

I actually created a shelf button that does it as well and it seems to work pretty well.

 

Thanks again for the response!