more robust selection getter

this could actually be a function in butils
This commit is contained in:
themancalledjakob 2024-11-21 14:35:21 +01:00
parent 2ba83ea3fe
commit 5c79392b40

View file

@ -713,7 +713,7 @@ def set_text_on_curve(text_properties, recursive=True):
text_properties.glyphs.clear()
#TODO: fix selection with context_override
previous_selection = bpy.context.selected_objects
previous_selection = bpy.context.selected_objects if hasattr(bpy.context, "selected_objects") else [ o for o in bpy.context.scene.objects if o.select_get() ]
bpy.ops.object.select_all(action='DESELECT')
selected_objects = []