diff --git a/src/blenderbim/blenderbim/core/spatial.py b/src/blenderbim/blenderbim/core/spatial.py index 3f3b5cdb42..41307096c3 100644 --- a/src/blenderbim/blenderbim/core/spatial.py +++ b/src/blenderbim/blenderbim/core/spatial.py @@ -164,7 +164,7 @@ def generate_space(ifc, spatial, model, Type): else: name = "Space" - obj = spatial.get_named_obj_from_mesh(name, mesh) ##mat + obj = spatial.get_named_obj_from_mesh(name, mesh) spatial.set_obj_origin_to_cursor_position(obj) spatial.link_obj_to_active_collection(obj) spatial.assign_ifcspace_class_to_obj(obj) diff --git a/src/blenderbim/blenderbim/tool/spatial.py b/src/blenderbim/blenderbim/tool/spatial.py index d7e51404c8..95ee9bffbc 100644 --- a/src/blenderbim/blenderbim/tool/spatial.py +++ b/src/blenderbim/blenderbim/tool/spatial.py @@ -525,9 +525,6 @@ class Spatial(blenderbim.core.tool.Spatial): @classmethod def get_named_obj_from_mesh(cls, name, mesh): obj = bpy.data.objects.new(name, mesh) - if bpy.context.active_object: - mat = bpy.context.active_object.matrix_world - obj.matrix_world = mat return obj @classmethod @@ -566,7 +563,6 @@ class Spatial(blenderbim.core.tool.Spatial): mat = obj.matrix_world inverted = mat.inverted() - collection = bpy.context.view_layer.active_layer_collection.collection collection_obj = collection.BIMCollectionProperties.obj x, y = bpy.context.scene.cursor.location.xy