// =========================================================================== // 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. // =========================================================================== // // If the panel is a scripted panel, return the editor for it // if it has a custom view. // global proc string getCustomViewEditorFromPanel( string $panel ) { string $editor = ""; if (`scriptedPanel -q -exists $panel`) { string $scriptedType = `scriptedPanel -q -type $panel`; int $isCustomView = `scriptedPanelType -q -customView $scriptedType`; if ( $isCustomView ) { // We assume the editor name follows the pattern, // panelName + "Editor". In the future, we may want // to abstract this a bit to make it arbitrary. // $editor = $panel + "Editor"; } } return $editor; }