Store & Restore Views

1 vote
Version: 
1.2
Date Updated: 
07/29/2022
Author Name: 
Branko Živković

srv
Simple tool for storing and restoring different viewports.

Additional Info: 

This tool supports different viewports: ortographic and non-ortographic
Top, Bottom, Front, Back, Left, Right, Orthographic, Perspective, Camera and Light
All data is saved with the *.max file (no external files)

How it works: the process is self-explanatory and there is some tooltips on the buttons.
To restore any view, just use double-click on the list item.

update 1.1 (request for fix by titane357)
- fixed some minor bugs (restoring views after you reopen maxfile)
- now script save last Rollout position on the screen
update 1.2 (request for fix by Juliano Salazar Rocha)
- changed some code: before MAX 2022.1 there was no support to converting string value to point2 value

Version Requirement: 
2017.1 +
AttachmentSize
bga_store_restore_views_v1.2.ms7.22 KB

Comments

Comment viewing options

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

-- MAXScript Rollout Handler

-- MAXScript Rollout Handler Exception:
-- Type error: Call needs function or class, got: undefined
-- MAXScript callstack:
-- thread data: threadID:5504
-- ------------------------------------------------------
-- [stack level: 0]
-- In k loop
-- Parameters:
-- k: 1
-- Locals:
-- node: undefined
-- vpd: undefined
-- vpdStruct: undefined
-- k: 1
-- FindNode: undefined
-- p3TOp2: undefined
-- Externals:
-- this: viewportDataAtt:viewportDataAtt
-- owner: undefined
-- ------------------------------------------------------
-- [stack level: 1]
-- called from getVPData()
-- member of:
-- Locals:
-- Externals:
-- this: viewportDataAtt:viewportDataAtt
-- owner: viewportDataAtt:viewportDataAtt
-- ------------------------------------------------------
-- [stack level: 2]
-- called from bga_srvRoll.open(); filename: C:\Users\Rachka\Downloads\bga_store_restore_views_v1.2.ms; position: 7228; line: 179
-- member of: Rollout:bga_srvRoll
-- Locals:
-- Externals:
-- cbx_views: RolloutControl:cbx_views in rollout:bga_srvRoll : ComboBoxControl:cbx_views
-- rootNode: SystemGlobal:rootNode : $
-- bga_srvRoll: Global:bga_srvRoll : Rollout:bga_srvRoll
-- owner: Rollout:bga_srvRoll
-- ------------------------------------------------------
-- [stack level: 3]
-- called from top-level

rachka's picture

MAXScript Listener Message

-- MAXScript Rollout Handler Exception:
-- Type error: Call needs function or class, got: undefined
-- MAXScript callstack:
-- thread data: threadID:5504
-- ------------------------------------------------------
-- [stack level: 0]
-- In k loop
-- Parameters:
-- k: 1
-- Locals:
-- node: undefined
-- vpd: undefined
-- vpdStruct: undefined
-- k: 1
-- FindNode: undefined
-- p3TOp2: undefined
-- Externals:
-- this: viewportDataAtt:viewportDataAtt
-- owner: undefined
-- ------------------------------------------------------
-- [stack level: 1]
-- called from getVPData()
-- member of:
-- Locals:
-- Externals:
-- this: viewportDataAtt:viewportDataAtt
-- owner: viewportDataAtt:viewportDataAtt
-- ------------------------------------------------------
-- [stack level: 2]
-- called from bga_srvRoll.open(); filename: C:\Users\Rachka\Downloads\bga_store_restore_views_v1.2.ms; position: 7228; line: 179
-- member of: Rollout:bga_srvRoll
-- Locals:
-- Externals:
-- cbx_views: RolloutControl:cbx_views in rollout:bga_srvRoll : ComboBoxControl:cbx_views
-- rootNode: SystemGlobal:rootNode : $
-- bga_srvRoll: Global:bga_srvRoll : Rollout:bga_srvRoll
-- owner: Rollout:bga_srvRoll
-- ------------------------------------------------------
-- [stack level: 3]
-- called from top-level

barigazy's picture

...

post me what MaxScript Listener shows

barigazy

rachka's picture

saved some views

I saved some views, saved the max file then I closed max and opened the saved file - this pops up:

MAXScript Rollout Handler Exception
Type error: Call needs function or class, got: undefined

(3ds Max 2020)

barigazy's picture

...

script is updated to version 1.2

barigazy

titane357's picture

Thanks, it works fine now !

Thanks, it works fine now ! :-)

barigazy's picture

...

Thanks @titane357 for checking this out.
The tool is updated to version 1.1.
Now everything should work properly.

barigazy

barigazy's picture

...

One of the main purposes of this tool, at least for me, is for keeping (saving) specific positions during modeling of large architectural scenes.
In this way, endless zooming and scrolling is avoided.
Modeling in camera view is very annoying and adding additional cameras (to store specific position) in the scene which already has a tone of cameras for final render, IMO it's not so smart move.

;)

barigazy

titane357's picture

Hi, Sorry but I tested the

Hi,
Sorry but I tested the script in max2022, french win 10.
I create some views ( I verified it works ) I save the file.
Close it. Then re-open, script window is empty... :-(
( another one : position window is always centered )

JokerMartini's picture

Why not just create a camera

Why not just create a camera if you want the view to be saved? It's the same thing and saves with the file

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

Comment viewing options

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