Is it possible to create a custom viewport to show just one object?
I’d like to batch process various outputs from a file through scripting, ie parsing different rooms in a building and outputting a page per room with some info. Each of these pages can have several screenshots from the Rhino viewport with various overlays such as daylight results.
My workflow currently is:
hide everything
make a new popup viewport to make sure that it has the right display modes etc
bake temp items including attributes for line thickness etc
zoom to a boundingbox
updateviewport()
make a screenshot
delete temp stuff
repeat
alternative workflows could be using DrawMethods and Conduit but I found this easier (although slower).
Problem is if I have existing stuff in my viewport that’s locked etc its difficult to hide. And ideally I’d only update this “extra” viewport to take screenshots and not all of my viewports.
So heres the real question:
Is it possible to make a new floating viewport that will hide everything in my file except a list of specific items? While maintaining all the existing viewports?
It might be fast to give everything an ID of a top viewport, and just assign the Perspective ViewportId to the items you care about. It shouldn’t require you to modify any objects and you can reset to Guid.Empty once you’re done.
here is one more idea: what if you created a display mode that shows nothing (no type of object is allowed, all edge thickesses set to 0/invisible). Assign that mode to your new custom floating viewport and then use per-object display mode there for the objects you want to see.
Here is a quick test and a ‘nothing’ display mode - obviously many ways and what-ifs to code it, but this could be a simple solution (with a bit more headache for block instances, but doable as well) NOTHING.ini (13.7 KB)