PDA

View Full Version : script to go from object/component mode on the fly


Levitateme
06-14-2003, 10:24 AM
a while ago i checked command in maya to see what it was doing when i pressed F8 i copied that and added to my shelf. the problem was it didnt work all the time. does anyone know how i can have it so if im in component mode i can switch to object mode, and its absolute? i just ask cause i have every tool i use set as marking menus, i slow down having to get my hand off the mouse press f8 and start up again. it sounds like im just being lazy, but it really would save me alot of time.

stallion151
06-15-2003, 01:26 PM
theres a button to switch between hierachy/object/component mode its at the top on the status line.

Doogie
06-15-2003, 02:37 PM
here

mark_wilkins
06-15-2003, 02:42 PM
yeah but umm he wants to use marking menus, in case you didn't see that bit.

Anyway, you can set object selection mode by using the command


changeSelectMode -object;


and set component selection mode by using


changeSelectMode -component;


Note that this works in 4.0 (which is all I have handy to test right now) but it may have changed in 4.5 or 5.0 as this is a procedure in one of the .mel files that ships with Maya.

-- Mark

nautilus
06-15-2003, 09:45 PM
>>Levitateme
If ou are using Maya 5.0, just hold down "q+rmb", then you have your SelectMaskToolMarkingMenu

>>mark_wilkins
--------------------------------------------------------------------------------
It works for Maya 5.0

changeSelectMode -object;
changeSelectMode -hierarchical;
changeSelectMode -component;
--------------------------------------------------------------------------------
This is taken from the shelf_General.mel:

shelfButton
-label "Select by Hierarchy"
-image1 "selectByHierarchy.xpm"
-command ("changeSelectMode -hierarchical");

shelfButton
-label "Select by Object"
-image1 "selectByObject.xpm"
-command ("changeSelectMode -object");

shelfButton
-label "Select by Component"
-image1 "selectByComponent.xpm"
-command ("changeSelectMode -component");
---------------------------------------------------------------------------------

Levitateme
06-16-2003, 12:37 AM
hey thanks for your replies guys, mark i started thumbing through your book last night. im staying away from mel until school starts, a bit overwhelming if you dont know what your doing "me" i know very little mel, i did figure this out by thumbing throuhg your book though. this is the script im using on my marking menus

toggleSelMode;
changeSelectMode -object;

I wanted something so no matter what mode i was in it would take me b ack to object mode. i just find this useful for modeling. so this way i dont have to press F8 everytime cause, that realy does slow me down.

so far that has worked for me everytime, thanks again for the great book. ...cant wait to read it.

CGTalk Moderation
01-15-2006, 10:00 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.