mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
bim.assign_class - use get_selected_objects
This commit is contained in:
@@ -197,10 +197,8 @@ class AssignClass(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
objects: list[bpy.types.Object] = []
|
objects: list[bpy.types.Object] = []
|
||||||
if self.obj:
|
if self.obj:
|
||||||
objects = [bpy.data.objects[self.obj]]
|
objects = [bpy.data.objects[self.obj]]
|
||||||
elif objects := context.selected_objects:
|
else:
|
||||||
pass
|
objects = list(tool.Blender.get_selected_objects())
|
||||||
elif obj := context.active_object:
|
|
||||||
objects = [obj]
|
|
||||||
|
|
||||||
if not objects:
|
if not objects:
|
||||||
self.report({"INFO"}, "No objects selected.")
|
self.report({"INFO"}, "No objects selected.")
|
||||||
|
|||||||
Reference in New Issue
Block a user