mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
You can now change the section line decorator width in the UI
This commit is contained in:
@@ -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=[
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user