PDA

View Full Version : Manipulator Change on Select


KielFiggins
04-05-2008, 01:34 AM
Hey everyone. A common function I had on my 3dsmax rigs was when you select a specific control (say an FK arm curve), your manipulator would default to rotate. If you selected the body curve, it would default to translate. And so on.

Theres a setting in the transform called "Show Manip Default" and it seems to give you the same options that im looking for, but for whatever reason it just doesnt seem to work when you select the control.

Any ideas?


Much apprecaited.

_stev_
04-05-2008, 03:19 AM
Yo bra,

In the attribute editor, under the Display rollout you set the "Show Manip Default" drop down list to Translate or Rotate for each contorl. Then to select objects hit "t" (Show Manipulators) instead of the move or rotate tool. Now when you select objects you'll get the manipulator you set for each control.

Later,
Stev

KielFiggins
04-15-2008, 12:00 AM
Haha, the Mighty Stev steps on up. Definatly works that way man, just not the solution for my particular work flow. I dont use the default manipulator (only use the w,e,r keys) so it seems if your in that tool, the override doesnt work (which is a bummer , i was hoping it would).

Thanks though man, much appreciated.

djx
04-15-2008, 10:05 PM
You could use zooTriggered (http://www.macaronikazoo.com) to trigger a change of manipulator on object selection. There is a very slight delay (when compared to Stev's suggestion) but you dont have to worry about using the "t" mode all the time.
-- David

bclark
04-16-2008, 02:04 AM
Hey Keil, hope shilo is treating you well.
Zoo works great, if you don't want to intall zoo though, you can use code from my rigging book that I go working thanks to Steve Theadore, rigging cook book..

it reads a custom attribute i create on the object ( I can set it to gimble , or local, or world etc.. I just create an entry per attribute ) and then a script job can be turned on or off to do this.



global proc SL_toolSwitch()
{
scriptJob -e "SelectionChanged" "whichTool";
}

global proc whichTool()
{

string $gTools = `currentCtx`;
string $manipModeSwitch;
string $obj[] = `ls -sl`;
if (size($obj) != 0)
{
if (`attributeExists "defaultTool" $obj[0]`)
{
string $tool = `getAttr ($obj[0] + ".defaultTool")`;
switch ($tool)
{
case "0":
//worldSpace move
$gTools = "moveSuperContext";
$manipModeSwitch = `manipMoveContext -edit -mode 2 Move`;
break;
case "1":
//object move
$gTools = "moveSuperContext";
$manipModeSwitch = `manipMoveContext -edit -mode 1 Move`;
break;

case "2":
$gTools = "RotateSuperContext";
break;
case "3":
$gTools = "scaleSuperContext";
break;
}
}
}
setToolTo $gTools;
}



add an attribute to your ctrl object..

enum- defaultTool

Then you can just label it to match the tool order ( does not matter though),
just the order.., 0,1,2,3, etc.. and if you want more options you can add it to the case statement.


p.s djx, nice blog

Brad

djx
04-17-2008, 02:15 PM
Brad, I hope you dont mind, but I took your code and built a little wrapper script to make it easy to use for non-coders. It's here (http://www.djx.com.au/blog/2008/04/18/djswitchmaniponselectionmel/)for anyone that's interested.

Brad did all the real coding. I just added a few extra lines here and there (and even some of those I copied from Hamish McKenzie). ;)

bclark
04-18-2008, 06:19 AM
oh nice work, don't mind at all happy to contribute. the more we can all share the better, the TD world is really so small and we all face the same set of issues.

CGTalk Moderation
04-18-2008, 06:19 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.