PDA

View Full Version : Popup Menu for the Sculpt Geometry Tool


Buexe
11-12-2008, 07:16 PM
Now check this out: this poor Sculpt Geometry Tool has no Ctrl+Shift+RightMouseButton popup menu or am I blind? This would be very cool just to switch from relax to pull or whatever mode( I prefer the relax over the smooth option ). Now, I thought since there is MEL it should be just a matter of creating a simple script, like:


global proc artPuttyContextOptionsPopup()
{
menuItem -l "relax mode" -c "artUpdatePuttyOperation artPuttyCtx relax" ;
}

But somehow this doen`t work. The menu doesn`t show up. Anybody can help me?
Thanks in advance!!!

goleafsgo
11-12-2008, 08:10 PM
string $tool = `currentCtx`;
string $class = `contextInfo -c $tool`;
string $scriptName = $class + "OptionsPopup";


This is the bit of mel which Maya runs to figure out what the name of the script should be. In your case $tool will "artPuttyContext" but $class will actually be "artPutty". So your script name should be "artPuttyOptionsPopup".

Buexe
11-12-2008, 08:57 PM
Nothing but awesome! Thanks, mate!
Here is now a simple context popup menu, for those who would like to have one aswell:

global proc artPuttyOptionsPopup()
{
menuItem -l "Push" -c "artUpdatePuttyOperation artPuttyCtx push;";
menuItem -l "Pull" -c "artUpdatePuttyOperation artPuttyCtx pull;";
menuItem -l "Smooth" -c "artUpdatePuttyOperation artPuttyCtx smooth;";
menuItem -l "Relax" -c "artUpdatePuttyOperation artPuttyCtx relax;";
menuItem -l "Erase" -c "artUpdatePuttyOperation artPuttyCtx erase;";
}

NaughtyNathan
11-13-2008, 08:24 AM
alternatively, just hold down the u key :)

:nathaN

Buexe
11-13-2008, 08:26 AM
alternatively, just hold down the u key :)

:nathaN

that`s actually pretty easy ; )
thanks for that one, didn`t know about it.
Cheers!

CGTalk Moderation
11-13-2008, 08:26 AM
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.