ScriptSpot

Forum topic · Scripts Wanted

Rotating into Perspective View

By tiagori · 2013-04-13

Description

Guys,

Would be great if we had a script that allow us to model in orthographic view, then when we rotate/orbit the viewport, it switched directly to perspective view, intead of user view.

I know that i can just press P to convert it back to perspective, but its becames very annoying to press it every time!!

Thanks in advance!

Comments (9)

harumscarum · 2019-04-17

apparently is not working with the 2020 Max version
could it be fixed?

thanks

.

miauu · 2019-04-17

I have tested this and it works:


macroscript isVptToPerspVpt
category:"miauu"
tooltip:"isVptToPerspVpt"
buttonText:"isVptToPerspVpt"
(
	callbacks.removeScripts id:#callView
	fn userToPerspective = 
	(
		if viewport.getType() == #view_iso_user do 
		(
			viewport.setType #view_persp_user
			max tool zoomextents all
	 
		)
	)
	callbacks.addScript #viewportChange "userToPerspective()" id:#callView
)

tiagori · 2013-04-13

oh man! This is great!!! Thanks so much!! worked like a charm!

Btw, is there a way to automatic "Z" when rotating??

thanks Barigazy!!

barigazy · 2013-04-13

Yup.

max tool zoomextents all

should do it but works when tou switch from user to perspective ei. only once

barigazy · 2013-04-13

run this in listener
if you find this useful save it as *.ms and put inside scripts > startup folder
after all you need to use "Z" (zoomextents all) after "Alt+MMB"

callbacks.removeScripts id:#callView
fn userToPerspective =
(
if viewport.getType() == #view_iso_user do
(
viewport.setType #view_persp_user
max tool zoomextents all

)
)
callbacks.addScript #viewportChange "userToPerspective()" id:#callView

can we zoom extent with using z

vikirecon · 2017-09-20

hi barigazy

first of all i was so much in need of this script i was going to post in the script wanted section

thanks so much for this wonderful script

but can we do away with z

thanks

viki

tiagori · 2013-04-13

i know...but you also need to press a key to go into perspective...i trying to get a more fluid workflow. It would be automatic and fast rotating the viewport from top or front view for example, very dynamic.

barigazy · 2013-04-13

I prefer to use "V" and pick from the list.