MEL How-To #13 | ||
| ||
How do I determine the name of the camera for the currently active layout panel?
proc string getCurrentCamera()
{
string $camera;
// First get the panel that currently has focus
string $panel = `getPanel -wf`;
// Compare the panel's type to confirm it is a "modelPanel"
if ( "modelPanel" == `getPanel -to $panel` )
{
// Get the name of the camera using the ‘modelEditor’ command
$camera = `modelEditor -q -camera $panel`;
}
return $camera;
}
| ||
| Copyright ©2005 by Bryan Ewert, maya@ewertb.com Maya is a Registered Trademark of Alias |