mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
fix generate space and covering where objects weren't created in the right location
This commit is contained in:
committed by
Massimo Fabbro
parent
bf43efe509
commit
a99529cb1e
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user