mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +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.calculate_unit_scale()
|
||||||
ifc_importer.process_context_filter()
|
ifc_importer.process_context_filter()
|
||||||
ifc_importer.material_creator.load_existing_materials()
|
ifc_importer.material_creator.load_existing_materials()
|
||||||
openings = set(openings)
|
ifc_importer.create_generic_elements(set(openings))
|
||||||
openings -= ifc_importer.create_products(openings)
|
for opening_obj in ifc_importer.added_data.values():
|
||||||
for opening in openings or []:
|
bpy.context.scene.collection.objects.link(opening_obj)
|
||||||
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)
|
|
||||||
return ifc_importer.added_data.values()
|
return ifc_importer.added_data.values()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
@@ -149,16 +149,11 @@ class System(blenderbim.core.tool.System):
|
|||||||
ifc_importer.file = tool.Ifc.get()
|
ifc_importer.file = tool.Ifc.get()
|
||||||
ifc_importer.calculate_unit_scale()
|
ifc_importer.calculate_unit_scale()
|
||||||
ifc_importer.process_context_filter()
|
ifc_importer.process_context_filter()
|
||||||
ports = set(ports)
|
ifc_importer.create_generic_elements(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.place_objects_in_collections()
|
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
|
@classmethod
|
||||||
def run_geometry_edit_object_placement(cls, obj=None):
|
def run_geometry_edit_object_placement(cls, obj=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user