Notifications
Clear all

[Closed] viewport change view, script help

 Rav

Hi,
Im really struggling to write a very simple maxscript.
What im after is when running the script have it,
Pick the active viewport camera and change all the other viewport views to that camera view.
if i can have this to work with scenes with multiple cameras. so picking the active viewport camera is a must.
i have images below to explain

Thanks in advance
Active viewport view:

views copied to all the other viewport views, after script has been executed.

2 Replies
 lo1
(
	local cam = viewport.getCamera() 
	if (cam != undefined) do
	(
		for i = 1 to viewport.numViews do
		(
			viewport.activeViewport = i
			viewport.setCamera cam
		)
	)
)
 Rav

Thank you Lo,
just what im after perfect