// =========================================================================== // 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: 18 Feb 2004 // // Description: // Determine the editor associated with a panel // // Input Arguments: // panel - The name of the panel object // panelType - The type of the panel or "" if the type should // be determined from the panel. // scriptedPanelType - The type of the panel if it is a scripted panel or "" // // Return Value: // The editor associated with the panel or the empty string if the panel has // no associated editor. // global proc string editorNameFromPanel ( string $panel ) { string $editor = ""; $panelType = `getPanel -typeOf $panel`; if ($panelType == "scriptedPanel") { string $scriptedPanelType = `scriptedPanel -q -type $panel`; switch ($scriptedPanelType) { case "graphEditor": $editor = ( $panel + "GraphEd" ); break; case "hyperGraphPanel": $editor = ( $panel + "HyperGraphEd" ); break; case "nodeEditorPanel": $editor = ( $panel + "NodeEditorEd" ); break; case "createNodePanel": $editor = ( $panel + "CreateNodeEd" ); break; case "dopeSheetPanel": $editor = ( $panel + "DopeSheetEd" ); break; case "clipEditorPanel": $editor = ( $panel + "ClipEditor" ); break; case "sequenceEditorPanel": $editor = ( $panel + "SequenceEditor" ); break; } } return $editor; }