PDA

View Full Version : Max Style Camera Selection Script.


KnightLore
03-04-2010, 01:36 AM
For those that miss the Max camera selection style in Maya (like me :D ) , I made this simple script.


if (`window -exists nsSelCam`)
{
deleteUI nsSelCam;
}

string $cameras[] = `listCameras`;
string $availcam[];


for ($i = 0; $i < size($cameras); $i++)
{
if ($cameras[$i] !="persp" && $cameras[$i] !="top" && $cameras[$i] !="side" && $cameras[$i] !="front")
{
$availcam[$i] = $cameras[$i];
};
};


if (size($availcam) > 0)
{
if (size($availcam)==1)
{
lookThru $availcam[0];
}
else
{
string $window = `window -title "Select Camera" nsSelCam`;
paneLayout;
textScrollList nlist;
int $i;
for ($i = 0; $i < size($availcam); $i++)
{
string $command = "lookThru `textScrollList -query -selectItem nlist`;deleteUI nsSelCam";
textScrollList -edit -append $availcam[$i] -dcc $command nlist;
}
showWindow nsSelCam;
}
}
clear($availcam);
clear($cameras);

If you have one camera other than the default in your scene, the script will switch to it automatically. If yo have more than one, a windows with a list appears, just double click the desired camera.

Bind to the "c" key if you are a nostalgic :D

NaughtyNathan
03-04-2010, 10:04 AM
Bind to the "c" key if you are a nostalgic

dude, I really hope this was a joke! ;)
:nathaN

KnightLore
03-04-2010, 10:04 PM
dude, I really hope this was a joke! ;)
:nathaN

Yes, it was ;)

CGTalk Moderation
03-04-2010, 10:04 PM
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.