Question
I’m trying to get a mesh outline from a specific viewport. I’m coming across a problem. How do I make GH give me a mesh outline from
mesh_outline.gh (166.7 KB)
the named view I’m asking for.
Context
Regardless of the value I give to view (MeshOutline(object_ids, view=None)
) I get the currently active viewport’s outline.
It should be updating the outline when the view name changes. If I move the viewport, it does update when I change the view name, but not how I expect it to.
Here’s the code:
import rhinoscriptsyntax as rs
from scriptcontext import doc
if use_active:
view_name = doc.Views.ActiveView.ActiveViewport.Name
the_view_we_want = None
for view in doc.Views:
if view.ActiveViewport.Name == view_name:
print "using {}".format(view.ActiveViewport.Name)
the_view_we_want == view
a = rs.MeshOutline(my_mesh, view=the_view_we_want)
Refs
Nathan ‘jesterKing’ Letwory’s answer was very helpful in getting this far.