This script has two functions:

  1. To provide a more reliable "Frame Selected" and "Frame All" function by adding calculation for the Far Clip Plane.

  2. To fix a bug when using ‘fitPanel’ (assigned by default to the ‘f’ and ‘a’ hotkeys) with Orthographic cameras. Sometimes Maya inappropriately calculates the Orthographic Width, basing the value on centimeters instead of the units you've currently set for your scene (eg. meters). It is currently undetermined what causes this behavior, as it tends to be somewhat erratic.


frameSelected «fit type» «all views» «adjust Far Clip Plane»
«fit type»(string)"-selected" to frame only selected items or "-all" to frame everything.
«all views»(boolean)If false, the current view will be adjusted; if true, all views will be adjusted.
«adjust Far Clip Plane»(boolean)If true, the size of all scene geometry will be calculated and the camera's Far Clip Plane will be adjusted to extend far enough to see everything.