// =========================================================================== // 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. // =========================================================================== // // This proc pops a rendRelPanel so that it is visible. // If a rendRelPanel doesn't exist than it creates one, // if one does it pops it to the front. // global proc renderingRelationshipPanelPop() { // string $rrPanel[] = `getPanel -stp rendRelPanel`; // This is the bad code when getPanel -stp is a valid // flag blow this away. string $rrPanel[]; string $allScriptedPanels[] = `getPanel -typ scriptedPanel`; for ($thisPanel in $allScriptedPanels) { string $type = `scriptedPanel -q -typ $thisPanel`; if ($type == "rendRelPanel") { $rrPanel[0] = $thisPanel; break; } } if (size($rrPanel) <= 0) { rendRelPanel renderingRelationshipPanel; $rrPanel[0] = "renderingRelationshipPanel"; } // panel to replace... string $panelToReplace = `getPanel -wf`; scriptedPanel -e -rp $panelToReplace $rrPanel[0]; }