Save & Restore Views

7 votes
Version: 
0.2
Date Updated: 
04/14/2014

A simple script that is pretty similar to max's own "Save active perspective view" and "Restore active perspective view" functionality just that there are 5 slots with preview images. Un-comment the first 2 lines to install it as a macroscript. Click the little lock symbol to save a view, click the image button to restore it. 

AttachmentSize
saveandrestoreviews_0.2.ms3.27 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
GK3D's picture

Thanks

Thank you for this script. Nice one.

rachka's picture

doesn't remember the views between sessions and the exact zoom

Awesome script but it does not remember the saved views after closing max and reopening the scene and it does not remember the exact saved zooming extents but only returns the saved view with the current zooming.

robox's picture

saved Views are deleted once 3dsmax is closed

Hi,

thanks for your modificationes on this script. One thing i`m still missing is a way of
having the perspectives being saved after a restart of max. ATM all views are deleteed once i close and restart max. Is there a way to have the views and the thumbnails being stored till manual deleted ?

Thanks for your help.

Robin

igamaximus's picture

Great script

Great script DeadClown, thanks a lot !

dussla's picture

thank you good tool , can you modfiy some

thank you good tool
i would like to ask some
if i close script , next time all reset
can you save that and load preset auto next time ?

mistyrian's picture

nice

nice

3dwannab's picture

Compact Version and Ortho

This works with Ortho views too. I think it worked with this anyway. If not download my EDIT1 in this thread or Martins Original. It's working here with top views etc on Max 2016. Maybe your Max version is incompatible. I can't test below 2016.

New EDIT:
-- Toolbar Size.
-- Drag the little blank grey bit on the right to move the UI. It saves position when you reopen.
-- RMB to save View
-- LMB to activate View

Also to change the size of the ICONS it can be done to suit. Just modify the width and height value of this line and the script will do the rest.

rollout perspStore "View Store" width:205 height:35

AttachmentSize
saveandrestoreviews_0.2_0_0_compact_version_3dwannab_edit.ms 5.08 KB
stevirt's picture

top view

Nice script. Thank you! Is it possible for me to change the script to use top view instead of perspective view? The script will save active top views (at least create a thumbnail of them) but not restore them.

Thanks again!

Kurai's picture

3dwannab Revamp

Thanks 3dwannab (and Deadclown)... I have adopted your revamp of this script cos you have made it smaller. I find this script crucial for final camera position and quickly moving from inside to outside of a building to make alterations since moving around gets sluggish with big models. It should be re-named: Teleport Tool :)

But... could it be smaller?

I would prefer it to be toolbar size so it can be docked easily.
For me the size of the picture is not important.
Really fed up of floating toolbars.

Thanks

3dwannab's picture

Changed the code

Hope you don't mind deadclown but I've found time to get the script like I descrided. Simple enough really but only works for max 2015 or more because it uses: NitrousGraphicsManager.GetActiveViewportSetting()

I modified and hidden all but two of the views (Felt 5 was too much for me :) ) in this script and changed the name to View Store (I hope you don't mind :P). Fixed saving the pos when dialog is moved and I've added a reset viewports button also to with the following settings:

		actionMan.executeAction 0 "40043" -- Selection: Select None
		viewport.ResetAllViews() --resets to Max Standard
		actionMan.executeAction 0 "311" --frames all viewports
		viewport.zoom .6 --fix to make perspective view appear closer
		completeredraw() --redraw the views
		viewport.setGridVisibility #all false --turns off all grids
		actionMan.executeAction 0 "40829" --show statistics

For anyone wanted basic shading saves in 2015 max or less you can look for the code and change:

		fn saveTM =(
			try(
				vpedgedfaces = viewport.GetShowEdgeFaces()
				VisualStyleMode = (impl = NitrousGraphicsManager.GetActiveViewportSetting() impl.VisualStyleMode) -- 2015 max version
				--vprenderlevel = viewport.GetRenderLevel() -- 2015 less max version
				vpType = viewport.getType()
				tmMatrix = getViewTM()			
			)catch()
		),
		fn getTM =(
			try(
				viewport.SetShowEdgeFaces vpedgedfaces
				impl = NitrousGraphicsManager.GetActiveViewportSetting() impl.VisualStyleMode = VisualStyleMode -- 2015 max version
				--viewport.SetRenderLevel vprenderlevel -- 2015 less max version
				viewport.setType vpType
				viewport.setTM tmMatrix
			)catch()
		),

And replace with:

		fn saveTM =(
			try(
				vpedgedfaces = viewport.GetShowEdgeFaces()
				--VisualStyleMode = (impl = NitrousGraphicsManager.GetActiveViewportSetting() impl.VisualStyleMode) -- 2015 max version
				vprenderlevel = viewport.GetRenderLevel() -- 2015 less max version
				vpType = viewport.getType()
				tmMatrix = getViewTM()			
			)catch()
		),
		fn getTM =(
			try(
				viewport.SetShowEdgeFaces vpedgedfaces
				--impl = NitrousGraphicsManager.GetActiveViewportSetting() impl.VisualStyleMode = VisualStyleMode -- 2015 max version
				viewport.SetRenderLevel vprenderlevel -- 2015 less max version
				viewport.setType vpType
				viewport.setTM tmMatrix
			)catch()
		),


AttachmentSize
saveandrestoreviews_0.2_0 3dwannab EDIT.ms 4.61 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.