Skip to content

Commit

Permalink
Fix unreliable type usage.
Browse files Browse the repository at this point in the history
Use second half of base type representation for
increased reliability in type detection and
usage as key in data dictionary.

Resolves #126
  • Loading branch information
jesterKing committed Oct 9, 2024
1 parent 675a191 commit 970967b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion import_3dm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
bl_info = {
"name": "Import Rhinoceros 3D",
"author": "Nathan 'jesterKing' Letwory, Joel Putnam, Tom Svilans, Lukas Fertig, Bernd Moeller",
"version": (0, 0, 14),
"version": (0, 0, 15),
"blender": (3, 3, 0),
"location": "File > Import > Rhinoceros 3D (.3dm)",
"description": "This addon lets you import Rhinoceros 3dm files in Blender 3.3 and later",
Expand Down
4 changes: 2 additions & 2 deletions import_3dm/converters/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def reset_all_dict(context : bpy.types.Context) -> None:
context.blend_data.curves
]
for base in bases:
t = type(base.bl_rna)
t = repr(base).split(',')[1]
if t in all_dict:
dct = all_dict[t]
else:
Expand All @@ -105,7 +105,7 @@ def reset_all_dict(context : bpy.types.Context) -> None:

def get_dict_for_base(base : bpy.types.bpy_prop_collection) -> Dict[str, bpy.types.ID]:
global all_dict
t = type(base.bl_rna)
t = repr(base).split(',')[1]
if t not in all_dict:
pass
return all_dict[t]
Expand Down

0 comments on commit 970967b

Please sign in to comment.