set_objects_selection to set selection only if active_object is not None

It was creating errors if you'd try to add angle annotation without having any objects active.
This commit is contained in:
Andrej730
2023-08-18 15:37:04 +05:00
parent 7228329f5e
commit dcc9d0e9cd
+2 -1
View File
@@ -357,7 +357,8 @@ class Blender:
for obj in selected_objects:
obj.select_set(True)
context.view_layer.objects.active = active_object
active_object.select_set(True)
if active_object:
active_object.select_set(True)
@classmethod
def enum_property_has_valid_index(cls, props, prop_name, enum_items):