Automatically select annotations after creation to make it easier to move them in bulk.

This commit is contained in:
Ryan Schultz
2025-10-16 21:10:43 -05:00
parent f52aafdd6a
commit ead849625d
@@ -299,6 +299,8 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator):
return
related_objects = bpy.context.selected_objects
created_objects = []
for related_object in related_objects:
obj = core.add_annotation(
tool.Ifc,
@@ -312,6 +314,14 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator):
enable_editing=False,
)
tool.Drawing.setup_annotation_object(obj, object_type, related_object)
created_objects.append(obj)
# Select the created annotation objects
bpy.ops.object.select_all(action='DESELECT')
for obj in created_objects:
obj.select_set(True)
if created_objects:
bpy.context.view_layer.objects.active = created_objects[-1]
def hotkey_S_A(self):
if bpy.ops.bim.add_annotation.poll():