diff --git a/src/blenderbim/blenderbim/bim/prop.py b/src/blenderbim/blenderbim/bim/prop.py index 0fe6ebd8df..9648c580ac 100644 --- a/src/blenderbim/blenderbim/bim/prop.py +++ b/src/blenderbim/blenderbim/bim/prop.py @@ -173,6 +173,18 @@ def update_section_color(self, context): pass +def update_section_line_decorator(self, context): + compare_node_group = bpy.data.node_groups.get("Section Compare") + if compare_node_group is None: + return + for node in compare_node_group.nodes: + if not hasattr(node, "operation"): + continue + if node.operation == "COMPARE": + node.inputs[2].default_value = self.section_line_decorator_width + break + + class StrProperty(PropertyGroup): pass @@ -313,13 +325,20 @@ class BIMProperties(PropertyGroup): last_transaction: StringProperty(name="Last Transaction") should_section_selected_objects: BoolProperty(name="Section Selected Objects", default=False) section_plane_colour: FloatVectorProperty( - name="Temporary Section Cutaway Colour", + name="Cutaway Colour", subtype="COLOR", default=(1, 0, 0), min=0.0, max=1.0, update=update_section_color, ) + section_line_decorator_width: FloatProperty( + name="Line Decorator Width", + default=0.04, + min=0.0, + soft_max=1.0, + update=update_section_line_decorator, + ) area_unit: EnumProperty( default="SQUARE_METRE", items=[ diff --git a/src/blenderbim/blenderbim/bim/ui.py b/src/blenderbim/blenderbim/bim/ui.py index 045f273464..b4705aa0b8 100644 --- a/src/blenderbim/blenderbim/bim/ui.py +++ b/src/blenderbim/blenderbim/bim/ui.py @@ -78,11 +78,9 @@ class BIM_PT_section_plane(Panel): layout.use_property_split = True props = context.scene.BIMProperties - row = layout.row() - row.prop(props, "should_section_selected_objects") - - row = layout.row() - row.prop(props, "section_plane_colour") + layout.prop(props, "should_section_selected_objects") + layout.prop(props, "section_plane_colour") + layout.prop(props, "section_line_decorator_width") row = layout.row(align=True) row.operator("bim.add_section_plane")