// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: 7 May 1997 // // // // // // allViewFit (int $allObjects) // // // None // // // Apply the viewFit command to all model panels. // // // int $allObjects if true, fit the view around all objects, otherwise use just the active object(s). // // // // Fit the view to all objects: // allViewFit(1); // // // Fit the view to just the selected objects: // allViewFit(0); // // global proc allViewFit( int $allObjects) { string $panes[] = `getPanel -type modelPanel`; string $pane; for ($pane in $panes) { if ($allObjects) viewFit -all `modelEditor -q -camera $pane`; else viewFit `modelEditor -q -camera $pane`; } }