// =========================================================================== // 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. // =========================================================================== // // Description: // This script pops between a single and multiple pane configuration // for the main window pane, using the passed-in screen coordinates to // determine which of the multiple panes to use. // If the cursor is currently over a torn-off panel, nothing happens. // // Input Arguments: // $x, $y - global screen coordinates of panel to pop. // // Return Value: // None. // global proc panePopAt (int $x, int $y) { global string $gMainPane; string $pupPanel = `getPanel -underPointer`; if ("" == $pupPanel || `panel -q -tearOff $pupPanel`) return; string $panel = `getPanel -atPosition $x $y`; if ("" != $panel) { string $paneConfiguration = `paneLayout -q -configuration $gMainPane`; if ($paneConfiguration == "single") { doSwitchPanes(1, { "@goBack", "" }); } else { doSwitchPanes(1, { "single", $panel}); } updateToolbox(); } }