jesterKing / import_3dm

Blender importer script for Rhinoceros 3D files
MIT License
298 stars 37 forks source link

assign id-tags to views (and other yet unidentifid items) #57

Open lfertig opened 4 years ago

lfertig commented 4 years ago

Describe the bug views (and group collections) are currently not id-tagged, which causes unwanted behaviour when trying to fetch objects by uuid

To Reproduce -see issue #55

Expected behavior *all items that have an uuid in rhino should have one assigned in blender

Additional context NamedViews are missing a variable that needs to be exposed in the bindings.

opennurbs_3dm_settings.h:

  ///////////////////////////////////////////////////////////////////////
  //
  // Named view information
  //
  // If this view was created from a named view, then m_named_view_id 
  // identifies the named view.
  //
  // The named views are ON_3dmView classes saved in ON_3dmSettings.m_named_views[].
  // A named view's id is the value returned by ON_3dmView.m_vp.ViewportId()
  // A named view's name is the value returned by ON_3dmView.m_name
  //
  // If this view is a named view, then m_named_view_id should be equal to
  // m_vp.m_viewport_id.
  //
  // If this view is not a named view and not created from a named view,
  // then m_named_view_id is equal to ON_nil_uuid.
  ON_UUID m_named_view_id;  
lfertig commented 4 years ago

I'm working on this right now. I had to add some lines to rhino3dm to expose the view_id. The thing is, only NamedViews have a guid, the standard views return zeroes (see screenshot). I'm wondering if this is going to cause us any hard time when filtering for objects? At least they're going to have the id tag set, so we wouldn't run into the error mentioned in #55 anymore.. image