From fa775caa6c8b21de2e0687ab365dc1161002ab36 Mon Sep 17 00:00:00 2001 From: Ryan Inch Date: Tue, 2 Apr 2024 05:26:21 -0400 Subject: [PATCH] Fix gizmo update check error on import when importing armatures (e.g. 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. --- addons/io_hubs_addon/components/gizmos.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/io_hubs_addon/components/gizmos.py b/addons/io_hubs_addon/components/gizmos.py index 5e3fc75b..0d05d1f2 100644 --- a/addons/io_hubs_addon/components/gizmos.py +++ b/addons/io_hubs_addon/components/gizmos.py @@ -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)