mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 11:06:51 +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
|
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):
|
class StrProperty(PropertyGroup):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -313,13 +325,20 @@ class BIMProperties(PropertyGroup):
|
|||||||
last_transaction: StringProperty(name="Last Transaction")
|
last_transaction: StringProperty(name="Last Transaction")
|
||||||
should_section_selected_objects: BoolProperty(name="Section Selected Objects", default=False)
|
should_section_selected_objects: BoolProperty(name="Section Selected Objects", default=False)
|
||||||
section_plane_colour: FloatVectorProperty(
|
section_plane_colour: FloatVectorProperty(
|
||||||
name="Temporary Section Cutaway Colour",
|
name="Cutaway Colour",
|
||||||
subtype="COLOR",
|
subtype="COLOR",
|
||||||
default=(1, 0, 0),
|
default=(1, 0, 0),
|
||||||
min=0.0,
|
min=0.0,
|
||||||
max=1.0,
|
max=1.0,
|
||||||
update=update_section_color,
|
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(
|
area_unit: EnumProperty(
|
||||||
default="SQUARE_METRE",
|
default="SQUARE_METRE",
|
||||||
items=[
|
items=[
|
||||||
|
|||||||
@@ -78,11 +78,9 @@ class BIM_PT_section_plane(Panel):
|
|||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
props = context.scene.BIMProperties
|
props = context.scene.BIMProperties
|
||||||
|
|
||||||
row = layout.row()
|
layout.prop(props, "should_section_selected_objects")
|
||||||
row.prop(props, "should_section_selected_objects")
|
layout.prop(props, "section_plane_colour")
|
||||||
|
layout.prop(props, "section_line_decorator_width")
|
||||||
row = layout.row()
|
|
||||||
row.prop(props, "section_plane_colour")
|
|
||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.operator("bim.add_section_plane")
|
row.operator("bim.add_section_plane")
|
||||||
|
|||||||
Reference in New Issue
Block a user