View Full Version : How to select the current viewing camera
bkravi 02-11-2010, 08:27 AM How to select the current viewing camera using mel, please help
|
|
theazz
02-11-2010, 08:58 AM
// find out which panel is active
string $panelName = `getPanel -wf` ;
// get the camera for the active panel
string $camera = `modelEditor -q -camera $panelName`;
// select it
select $camera;
NaughtyNathan
02-11-2010, 09:03 AM
first you have to detect which panel your focus is in, then you have to query what camera the modelPanel is using.
string $panel = `getPanel -withFocus`;
string $camera = `modelPanel -q -camera $panel`;
alternatively, click on Panel menu > View > Select Camera ;)
Bah! beaten to the punch by a CGI dog! :)
:nathaN
bkravi
02-11-2010, 09:30 AM
Thank you guys, you all are very helpful.
CGTalk Moderation
02-11-2010, 09:30 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.