mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
update gizmo based on selected items
This commit is contained in:
@@ -1170,9 +1170,11 @@ class BoundingBoxDecorator:
|
|||||||
if not objects:
|
if not objects:
|
||||||
return None, None, None
|
return None, None, None
|
||||||
if len(objects) == 1:
|
if len(objects) == 1:
|
||||||
|
bpy.context.scene.transform_orientation_slots[1].type = "LOCAL"
|
||||||
obj = objects[0]
|
obj = objects[0]
|
||||||
corners = [obj.matrix_world @ mathutils.Vector(corner) for corner in obj.bound_box]
|
corners = [obj.matrix_world @ mathutils.Vector(corner) for corner in obj.bound_box]
|
||||||
else:
|
else:
|
||||||
|
bpy.context.scene.transform_orientation_slots[1].type = "GLOBAL"
|
||||||
all_corners = []
|
all_corners = []
|
||||||
for obj in objects:
|
for obj in objects:
|
||||||
if hasattr(obj, "bound_box"):
|
if hasattr(obj, "bound_box"):
|
||||||
|
|||||||
Reference in New Issue
Block a user