New feature to select the container of an object

This commit is contained in:
Dion Moult
2021-11-07 15:32:33 +11:00
parent de561b78e0
commit 05068754b9
10 changed files with 58 additions and 9 deletions
@@ -101,6 +101,11 @@ class Spatial(blenderbim.core.tool.Spatial):
tool.Ifc, tool.Collector, tool.Spatial, structure_obj=structure_obj, element_obj=element_obj
)
@classmethod
def set_active_object(cls, obj):
bpy.context.view_layer.objects.active = obj
obj.select_set(True)
@classmethod
def set_relative_object_matrix(cls, target_obj, relative_to_obj, matrix):
target_obj.matrix_world = relative_to_obj.matrix_world @ matrix