ScriptSpot

Script

Cycle Cameras

By Borislav Petrov · 2006-10-21

Version requirement
3
Date updated
1999-04-02
Votes
11
Download
Download
Description

Cycle through all cameras in a scene.

Tags: Cameras

Comments (6)

lalamax3d · 2008-12-26

rather then typing -1 , replace "(i+1)" by "cameras_array -1" in line 34 and it should work. goodluck

titane357 · 2008-12-27

I have no luck.... :-((

Inverse Script

looy1 · 2020-03-11

Hi, same problem here, can't get the script working to cycle the other way. Any advice?
Thanks!

obaida · 2020-03-11

Replace this Lines :


	for i = 1 to cameras_array.count do 
		(
		if cameras_array[i] == current_cam then next_camera_index = (i+1)   
		)
		
		if next_camera_index > cameras_array.count then
		(
		new_cam = cameras_array[1]
		)

with this :


	for i = 1 to cameras_array.count do 
		(
		if cameras_array[i] == current_cam then next_camera_index = (i-1)   
		)
		
		if next_camera_index == 0 then
		(
		new_cam = cameras_array[cameras_array.count]
		)

titane357 · 2008-12-24

Hello

That is a really handy script !! thanks....

I wanted to do Inverse : but when I invert loop :
"for i = cameras_array.count to 1 by -1 do "
I get an error.
Anybody can help ?

titane357 · 2008-12-26

pleaz, that must be easy for a master of maxscript !!! :-)