You can now change the section line decorator width in the UI

This commit is contained in:
Gorgious56
2023-04-05 14:22:44 +02:00
parent d717fe040d
commit 91d7229353
2 changed files with 23 additions and 6 deletions
+20 -1
View File
@@ -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=[
+3 -5
View File
@@ -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")