// =========================================================================== // 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: 28 August 1996 // // Procedure Name: // hotkeyCurrentCamera // // Description: // Procedure to determine the camera under the pointer. // // Input Arguments: // None. // // Return Value: // The name of the camera. // global proc string hotkeyCurrentCamera ( string $panelName ) { //if it is a model panel if ($panelName != "" && `getPanel -typeOf $panelName` == "modelPanel") { return `modelEditor -q -camera $panelName`; } //if it is a scripted panel if ($panelName != "" && `getPanel -typeOf $panelName` == "scriptedPanel") { string $scriptedType = `scriptedPanel -query -type $panelName`; int $isCustomView = `scriptedPanelType -q -customView $scriptedType`; if( $isCustomView ) return `stereoCameraView -q -camera ($panelName + "Editor")`; } return `lookThru -q`; }