mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-08 08:51:35 +00:00
Fix #3873. Regression due to new importing logic.
This commit is contained in:
@@ -438,17 +438,9 @@ class Model(blenderbim.core.tool.Model):
|
||||
ifc_importer.calculate_unit_scale()
|
||||
ifc_importer.process_context_filter()
|
||||
ifc_importer.material_creator.load_existing_materials()
|
||||
openings = set(openings)
|
||||
openings -= ifc_importer.create_products(openings)
|
||||
for opening in openings or []:
|
||||
if tool.Ifc.get_object(opening):
|
||||
continue
|
||||
opening_obj = ifc_importer.create_product(opening)
|
||||
if obj:
|
||||
opening_obj.parent = obj
|
||||
opening_obj.matrix_parent_inverse = obj.matrix_world.inverted()
|
||||
for obj in ifc_importer.added_data.values():
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
ifc_importer.create_generic_elements(set(openings))
|
||||
for opening_obj in ifc_importer.added_data.values():
|
||||
bpy.context.scene.collection.objects.link(opening_obj)
|
||||
return ifc_importer.added_data.values()
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -149,16 +149,11 @@ class System(blenderbim.core.tool.System):
|
||||
ifc_importer.file = tool.Ifc.get()
|
||||
ifc_importer.calculate_unit_scale()
|
||||
ifc_importer.process_context_filter()
|
||||
ports = set(ports)
|
||||
ports -= ifc_importer.create_products(ports)
|
||||
for port in ports or []:
|
||||
if tool.Ifc.get_object(port):
|
||||
continue
|
||||
port_obj = ifc_importer.create_product(port)
|
||||
if obj:
|
||||
port_obj.parent = obj
|
||||
port_obj.matrix_parent_inverse = obj.matrix_world.inverted()
|
||||
ifc_importer.create_generic_elements(set(ports))
|
||||
ifc_importer.place_objects_in_collections()
|
||||
for port_obj in ifc_importer.added_data.values():
|
||||
port_obj.parent = obj
|
||||
port_obj.matrix_parent_inverse = obj.matrix_world.inverted()
|
||||
|
||||
@classmethod
|
||||
def run_geometry_edit_object_placement(cls, obj=None):
|
||||
|
||||
Reference in New Issue
Block a user