ScriptSpot home

Select Active Camera

Downloads

3ds Max compatibility
See original listing claims
Report a problem
Community compatibilityNo compatibility reports yet

No reports yet for the available releases.

Community reviewsNo reviews yet.

Listing details

Version
1.00
From original requirements
6–2009
Original version requirement
3ds max 6-2009
Author’s update date
Legacy votes
30
Listing created
How compatibility works

Compatibility comes from the author’s supported range or requirements in the original listing. A tested version records what the author tried.

“2020 unconfirmed” in the catalog means support for 3ds Max 2020 is still unknown.

Community reports record successful tests on specific releases.

More by this author

Simply selects the active camera from the current viewport (even if cameras / layer is hidden). If you've ever been frustrated because you're working full screen looking through the camera lens then need to change something about your camera, this script is for you. In that case you just run the script and bam you're able to edit camera properties in the stack or adjust keys in the time slider all with a single keystroke instead of having to hunt around in the select by name dialog...

Usage:
Assign a keyboard shortcut / right click menu then activate when in a camera view - voila, camera selected.

Setup & notes

Installation:
1. Click Maxscript / Run Script and choose this file from wherever you saved it (probably your desktop)
1a. It will seem like nothing happened but that's exactly what it should do, you now need to assign a shortcut to it
2. Click Customize / Customize User Interface / Keyboard (tab)
3. Change the Category to "CG_Tools"
4. Click "Select Active Camera" and change its Hotkey to something, maybe Alt+C .Click Assign
5. Click Save and save your custom UI settings to a file, do yourself a favor and don't use the default.
6. That's it. Switch your viewport to a camera view, then press your hotkey and voila your camera will be selected.

Comments (7)
Ehab Kandil

Is there a way to select the camera being rendered? I know how to callback prerender, I want the way to get the camera being rendered

crystal3d

very usefull one!

infact there is one command that can be short-cut but it does not work, this works very good! thank you!

drimka

enhanced code

sorry for my english :)
this code detect camera type, and if this target camera (and now select camera) - select camera.target.
and vice versa :) if now select camera.target - select camera

------------------------------------

macroScript cg_SelectActiveCamera Category:"CG_Tools" toolTip:"Select Active Camera" buttontext:"Select Active Camera"
(
sel = $
curcam = try(getActiveCamera()) catch()
if curcam != undefined do (
camType = curcam.type
if camType == #target then (
case sel of (
(sel = curcam.Target): (
print("select [target] cam ")
select curcam
)

(sel = curcam): (
print("select [target] cam.target")
select curcam.Target
)

default: (
print("nothing selected. select cam")
select curcam
)

) -- case sel
)
else (
print("select [free] cam")
select curcam
)
) -- cam != undefined
)
------------------------------------

kilad

Hi, good idea, i have been wanting this for a while.

 I`ve been using laky`z "CamChangerFwd" for cycling through cameras, and now i put these two together:

macros.run "Laky'z" "CamChangerFwd"

macros.run "CG_Tools" "cg_SelectActiveCamera"

 ..and bind this to my c key.

nice

Christopher Grant

Haha. Well actually to be honest I had forgotten you can select a camera by right clicking on the viewport label... Now that you mentioned it I dug through customize/ui and didn't find any pre-existing command that could be assigned a keyboard shortcut though...

In my case this script came out of wanting to take a file with a ton of cameras in it and quickly cycle through the cameras and remove ones I didn't need. This script helps because I assign it a keyboard shortcut and quickly cycle through camera views and remove unnecessary cameras.

titane357

yes, it is already implemented, but it is good to see how to do it by script ! :-))

CgRay

Hi, do you know that this functionality is already in max?  If you right'click the viewport label, you can select "select camera" or "select camera target" this works with lights too.