// =========================================================================== // 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 implements the Swap the Urchin view and then rerender // named command. // proc int isAdynPaintPanel() { string $currentPanel = `getPanel -withFocus`; return (`scriptedPanel -ex $currentPanel` && `scriptedPanel -q -type $currentPanel` == "dynPaintScriptedPanelType"); } global proc dynPaintSwapPanelPress() { global string $gDynPaintEditorName; if (`isAdynPaintPanel`) { if (!`dynPaintEditor -q -canvasMode $gDynPaintEditorName`) { dynPaintEditor -e -swp 1 $gDynPaintEditorName; } } } global proc dynPaintSwapPanelRelease() { global string $gDynPaintEditorName; if (`isAdynPaintPanel`) { if (!`dynPaintEditor -q -canvasMode $gDynPaintEditorName`) { dynPaintEditor -e -swp 0 $gDynPaintEditorName; dynPaintEditor -e -pa 0 $gDynPaintEditorName; } } }