View Full Version : I want selected Controll objects(locators) to automatically change transform mode
03-04-2004, 08:50 AM
I hope i make myself clear.
letīs say i have a couple of locators or other objects on a character that serve as animation controllers. some of them are supposed to move and some are supposed to rotate. now is there a setting where i can let maya know witch objects should do what so that basically when i was in rotate mode on one object and then picked one in perspective view that i want to translate, the mode would automatically change so that i donīt have to hit the "W" and "E" keys all the time?
is that possible because in the docs i couldnīt find it.
thanks in advance.
03-04-2004, 10:40 AM
Softimage has this functionality but Maya does not (although it would be a nice thing to implement). You could create this pretty easily, however, with a scriptJob and the "setToolTo" command.
03-04-2004, 11:26 AM
hey David. Could you elaborate on that please? This sounds like it would be a neat addition to a rig.
03-04-2004, 12:35 PM
The scriptJob command will let you execute a procedure based on whether or not different conditions are true, or based on the occurence of some event, in this case, if the selection has changed (-event SelectonChanged). So you could query what the new selection is, and based on that, change the current tool with thet setToolTo command. Check out the MEL docs for more on these commands.
03-04-2004, 05:57 PM
Iīll have a look into that and will see what i can come up with allthough iīm just starting to get into mel. actually iīm starting to get into maya at the moment. weīll see.
03-04-2004, 06:36 PM
Maya does have something similar. It's called the default manipulator.
Modify>Transformation Tools>Default Object Manipulator
here you can set it to one of the 3 typical manipulators. Once these are specified for each object you can then select the show manipulator tool (button below scale tool) and it will show the default manipulator for that object. As you select different objects the manipulator will change to match that objects setting.
whats really cool is that you can select multiple objects and see each object's individual manipulator and change it without changing the other objects selected. This basically takes out the tedious selection step in posing a character since they are all visible.
There is a problem with these objects which prevents them from being used more often. You can't specify the manipulator's mode such as global, local, or object for moving or gimbal for rotations making it very difficult to use in heirarchies.
I wish someone at alias would finish this feature, its has potential to be very powerful, but it's not really even mentioned in the documentation.
03-04-2004, 06:48 PM
Didnīt know about that one, thanks for the tip.
03-04-2004, 07:01 PM
Turns out that this actually sets the showManipDefault attribute on the objectīs transform. This can also be set via the Attribute Editor, under Display->Show Manip Default. Thanks again for mentioning this jadamburke.
03-04-2004, 08:05 PM
that does seem like a cool feature in the attribute editor, but it doesn't seem to work for me.
When i change the "Show Manip Default" attribute to something other than None, it doesn't remember my setting. I select something else, then change my manipulator, and then go back and select that object and the manipulator doesn't automatically change to what I set it to in its attribute editor.
Am I missing something, or do I just not understand the true function of this attribute?
03-05-2004, 05:13 AM
Yeah, you need to be in manipulator mode ("t" button).
03-05-2004, 06:57 AM
I figured that out going throu about every attribute that i didnīt know and by accident hitting the "t" button. but when they dont work in heirarchies, this feature isnīt of much use as i plan to implement this in a controllrig for a character. iīll have to see if i can use this function anyway. is it in local or global mode when put in a heirarchie? if itīs in local mode it could at least be helpfull for rotation such as for tha hips as no matter how i flip my character around i would like to turn the hips on a local rotation. but for wrist and foot controlers it would be kind of funky to see the translates go in all sorts of directions instead of the global axis.
03-07-2004, 10:13 PM
you can also use my zooTriggered script to change manipulator mode. have a look at it here: zooTriggered (http://www.macaronikazoo.com/mel/download/zooTriggered.zip)
have a look in the help for a bit more info on how to use it, but basically this is what you do. select the object, and press the "add empty command" button. Then right click the "command" text field down the bottom, and select the "use move tool" menu option.
Now all you have to do, is make sure the script it loaded by pressing the load button. Now, what happens, is this script loads a scriptJob. So everytime you load maya, you'll have to make sure this script is loaded. You can have maya automatically load it for you if you want, by adding the command:
to the userSetup.mel file. Also, if you go to the File menu, you can install a shelf button for the script. This is the best way to make a shelf button for it, because it automatically sets up the icon, and RMB menu to the button for you.
theres heaps more you can do with this script, but this is the easiest way to get maya to change the current manipulator for you, because you don't need to be in the "t" manipulator mode - which kinda sucks imo.
03-08-2004, 07:07 AM
Thanks a lot. this scripts will be of big use to me.
03-09-2004, 06:34 AM
hey, no problem. the script can do heaps more than just change the manipulator. have a read through the help to see what you can do with it. its pretty powerful.
01-17-2006, 02:00 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.