2D Pan/Zoom and Isolate a character script

2 functions I use a lot in Maya:

1. 2D Pan/Zoom
panzoom3
Often when animating things like lip sync, eyes or fingers I’d like to get a closer view of those body parts from the angle of my shot cam. Maya has a simple function that will allow you to zoom in, without actually changing your camera set up.

First, enable the 2D Pan/Zoom in your Viewport (the icon with the magnifying glass).
panzoom1

Second, select your camera, open the Attribute Editor and adjust the settings under Display Options > 2D Pan/Zoom.
panzoom2

Simply clicking the 2D Pan/Zoom icon in your Viewport will now let you flick between your normal camera set up and a close up view.

Update: Thanks to Iestyn in the comments for this tip!
If you really want to speed up your workflow, the ‘ \ ‘ key is the hotkey for 2d pan, if you hold it down (instead of the ‘alt’ key) you can use it to navigate, zoom in & out, pan etc with the normal mouse buttons.

2. Isolate Select
panzoom4
At work I almost always animate with just my character Isolate Selected in the viewport, just for getting better playback speeds and for clarity without having to set up layers in every scene file/unload references. I’ve combined a few different scripts found online into one to make the process isolating a characters much quicker. Basically all I have to do is select one of the main controls (COG, Root, Head, Spine, IK hands), run the script and that character will now be Isolate Selected in the current viewport. The script includes a switch to turn the Isolate Select on/off and also works for all the Animation Mentor rigs I’ve tried.

string $myPanel = `getPanel -wf`;
$onOff=`isolateSelect -q -state $myPanel`;
if ($onOff>0){
isolateSelect -state 0 $myPanel;
isolateSelect -loadSelected $myPanel;
}
else{
int $i = 0;
string $n[] = `ls -sl`;
while($i == 0){
$n = `listRelatives -ap $n[0]`;
if(!`size($n)`){
$i = 1;
}
select -tgl $n;
}
enableIsolateSelect $myPanel true;
isolateSelect -state 1 $myPanel;
}

2 thoughts on “2D Pan/Zoom and Isolate a character script

  1. Ben Malberg

    Hi Tim,
    I just wanted to say I love your blog and it’s become a come-back-to resource for me. Very useful information, and I will implement a lot of it into my next shot.

    I look forward to seeing future entries.

    Thank you!
    Regards,
    Ben Malberg

    Reply
  2. Iestyn

    Hey Tim!

    I use both of these functions everyday in work too, they’re both incredibly useful. If you really want to speed up your workflow, the ‘ \ ‘ key is the hotkey for 2d pan, if you hold it down (instead of the ‘alt’ key) you can use it to navigate, zoom in & out, pan etc with the normal mouse buttons. Really handy!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *