mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Allow users to toggle import of opening elements.
This commit is contained in:
@@ -147,7 +147,8 @@ class IfcImporter():
|
||||
self.create_project()
|
||||
self.create_spatial_hierarchy()
|
||||
self.create_aggregates()
|
||||
self.create_openings_collection()
|
||||
if self.ifc_import_settings.should_import_opening_elements:
|
||||
self.create_openings_collection()
|
||||
self.purge_diff()
|
||||
self.patch_ifc()
|
||||
self.create_type_products()
|
||||
@@ -276,6 +277,10 @@ class IfcImporter():
|
||||
|
||||
element = self.file.by_id(shape.guid)
|
||||
|
||||
if not self.ifc_import_settings.should_import_opening_elements \
|
||||
and element.is_a('IfcOpeningElement'):
|
||||
return
|
||||
|
||||
self.ifc_import_settings.logger.info('Creating object {}'.format(element))
|
||||
|
||||
# TODO: make names more meaningful
|
||||
@@ -595,6 +600,7 @@ class IfcImportSettings:
|
||||
self.should_ignore_building_coordinates = False
|
||||
self.should_reset_absolute_coordinates = False
|
||||
self.should_import_curves = False
|
||||
self.should_import_opening_elements = False
|
||||
self.should_treat_styled_item_as_material = False
|
||||
self.should_use_cpu_multiprocessing = False
|
||||
self.should_use_legacy = False
|
||||
|
||||
@@ -81,6 +81,7 @@ class ImportIFC(bpy.types.Operator, ImportHelper):
|
||||
ifc_import_settings.should_ignore_site_coordinates = bpy.context.scene.BIMProperties.import_should_ignore_site_coordinates
|
||||
ifc_import_settings.should_ignore_building_coordinates = bpy.context.scene.BIMProperties.import_should_ignore_building_coordinates
|
||||
ifc_import_settings.should_import_curves = bpy.context.scene.BIMProperties.import_should_import_curves
|
||||
ifc_import_settings.should_import_opening_elements = bpy.context.scene.BIMProperties.import_should_import_opening_elements
|
||||
ifc_import_settings.should_auto_set_workarounds = bpy.context.scene.BIMProperties.import_should_auto_set_workarounds
|
||||
ifc_import_settings.should_treat_styled_item_as_material = bpy.context.scene.BIMProperties.import_should_treat_styled_item_as_material
|
||||
ifc_import_settings.should_use_cpu_multiprocessing = bpy.context.scene.BIMProperties.import_should_use_cpu_multiprocessing
|
||||
|
||||
@@ -376,6 +376,7 @@ class BIMProperties(PropertyGroup):
|
||||
import_should_ignore_building_coordinates: BoolProperty(name="Import Ignoring Building Coordinates", default=False)
|
||||
import_should_reset_absolute_coordinates: BoolProperty(name="Import Resetting Absolute Coordinates", default=False)
|
||||
import_should_import_curves: BoolProperty(name="Import Curves", default=False)
|
||||
import_should_import_opening_elements: BoolProperty(name="Import Opening Elements", default=False)
|
||||
import_should_auto_set_workarounds: BoolProperty(name="Automatically Set Vendor Workarounds", default=True)
|
||||
import_should_treat_styled_item_as_material: BoolProperty(name="Import Treating Styled Item as Material", default=False)
|
||||
import_should_use_legacy: BoolProperty(name="Import with Legacy Importer", default=False)
|
||||
|
||||
@@ -589,6 +589,8 @@ class BIM_PT_mvd(Panel):
|
||||
row.prop(bim_properties, 'export_has_representations')
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, 'import_should_import_curves')
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, 'import_should_import_opening_elements')
|
||||
|
||||
layout.label(text='Experimental Modes:')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user