From 4c67137d47052c53b9c36f1e032647c2682db886 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 9 Aug 2021 20:30:14 +1000 Subject: [PATCH] You can now create curve shapes from the debug panel too --- src/blenderbim/blenderbim/bim/module/debug/operator.py | 4 +++- src/blenderbim/blenderbim/bim/module/debug/ui.py | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/debug/operator.py b/src/blenderbim/blenderbim/bim/module/debug/operator.py index b7096f86e8..bcb196c9b4 100644 --- a/src/blenderbim/blenderbim/bim/module/debug/operator.py +++ b/src/blenderbim/blenderbim/bim/module/debug/operator.py @@ -113,6 +113,7 @@ class CreateShapeFromStepId(bpy.types.Operator): bl_idname = "bim.create_shape_from_step_id" bl_label = "Create Shape From STEP ID" bl_options = {"REGISTER", "UNDO"} + should_include_curves: bpy.props.BoolProperty() @classmethod def poll(cls, context): @@ -127,7 +128,8 @@ class CreateShapeFromStepId(bpy.types.Operator): self.file = IfcStore.get_file() element = self.file.by_id(int(context.scene.BIMDebugProperties.step_id)) settings = ifcopenshell.geom.settings() - # settings.set(settings.INCLUDE_CURVES, True) + if self.should_include_curves: + settings.set(settings.INCLUDE_CURVES, True) shape = ifcopenshell.geom.create_shape(settings, element) ifc_importer = import_ifc.IfcImporter(self.ifc_import_settings) ifc_importer.file = self.file diff --git a/src/blenderbim/blenderbim/bim/module/debug/ui.py b/src/blenderbim/blenderbim/bim/module/debug/ui.py index 5919b6058f..7575fa4f7b 100644 --- a/src/blenderbim/blenderbim/bim/module/debug/ui.py +++ b/src/blenderbim/blenderbim/bim/module/debug/ui.py @@ -32,8 +32,9 @@ class BIM_PT_debug(Panel): row = layout.row() row.operator("bim.profile_import_ifc") - row = layout.split(factor=0.7, align=True) - row.operator("bim.create_shape_from_step_id") + row = layout.split(factor=0.5, align=True) + row.operator("bim.create_shape_from_step_id").should_include_curves = False + row.operator("bim.create_shape_from_step_id", text="", icon="IPO_ELASTIC").should_include_curves = True row.prop(props, "step_id", text="") row = layout.split(factor=0.7, align=True)