Skip to content

Commit

Permalink
Fix gizmo update check error on import when importing armatures (e.g.…
Browse files Browse the repository at this point in the history
… avatars).

Note: this error affected any armature that is in edit mode with another non-armature selected
and so isn't import specific, but armatures apparently get changed into edit mode briefly when
importing so it gets reliably triggered on import.
  • Loading branch information
Exairnous committed Apr 2, 2024
1 parent ecadcc3 commit fa775ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/io_hubs_addon/components/gizmos.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ def depsgraph_update_post(dummy):
edited_objects = set(window.view_layer.objects.selected)
edited_objects.add(active_object)
for ob in edited_objects:
if ob.type != 'ARMATURE':
# edited/selected objects can include objects other armatures.
continue
if len(ob.data.edit_bones) != ob.data.hubs_old_bones_length:
do_gizmo_update = True
ob.data.hubs_old_bones_length = len(ob.data.edit_bones)
Expand Down

0 comments on commit fa775ca

Please sign in to comment.