This script allows you to save specific camera views of your model that can be easily restored.
I've found this to be very useful when I'm working on a model that needs to be exported as PDF or Adobe Illustrator and I need a precise camera orientation to be restored after making repeated edits on a model. The line art on the box for one of my models was generated using MOI's CopyToClipboardPDF() function and then pasted into Affinity Designer for layout of the print design.
Usage
Activate the View Manager script (I have it bound to my "V" key) and it will bring up a panel with a list of saved views which will initially be empty. Clicking the Create button will create an item called "View 1" in the list which will store the camera view for the 3D viewport. You can reorient the camera and click Create again, which will save additional views, each named sequentially.
Selecting a view from the list will reorient the camera to that saved view.
Clicking on the Rename View button will bring up an input field so you can rename the currently selected view.
Clicking the Delete button will remove the currently selected view.
Saved View Data File
Since there currently isn't a way to embed the saved view data directly into a 3DM file, the View Manager creates a "views.json" file located alongside the currently open file. The file is named after the base filename, excluding numeric version suffixes.
This allows you to share views across multiple versions of a model you are working on, e.g., you can open up "My Model.3dm" or "My Model 07.3dm" and have access to the same saved views using the file named "My Model.views.json".
Please note that this script will create a file in the same directory as your model with the same filename and the extension ".views.json" immediately after the script is activated.
Installation
Extract the attached ViewManager_v0.1.zip archive and move the ViewManager.htm and ViewManager.js files into your MOI Commands folder.
On Mac the folder is located at /Users/[your user name]/Library/Application Support/Moi/commands
On Windows the folder is located C:\Documents and Settings\[your user name]\Application Data\Moi\commands
If you use CustomUI, it should appear in your Scripts menu. You can also bind a hotkey to the command "ViewManager" to activate it.
Thanks to Michael for tips on scripting with MOI so that I could create this script!