mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 06:18:09 +00:00
IfcMaterialLayerSetUsage - Disable custom offset properties when the checkbox is unchecked
This commit is contained in:
@@ -231,7 +231,7 @@ class BIM_PT_object_material(Panel):
|
|||||||
bonsai.bim.helper.draw_attributes(self.props.material_set_attributes, self.layout)
|
bonsai.bim.helper.draw_attributes(self.props.material_set_attributes, self.layout)
|
||||||
bonsai.bim.helper.draw_attributes(self.props.material_set_usage_attributes, self.layout)
|
bonsai.bim.helper.draw_attributes(self.props.material_set_usage_attributes, self.layout)
|
||||||
|
|
||||||
self.custom_offset()
|
self.draw_custom_offset()
|
||||||
if ObjectMaterialData.data["set_item_name"] == "profile" and not self.mprops.profiles:
|
if ObjectMaterialData.data["set_item_name"] == "profile" and not self.mprops.profiles:
|
||||||
row = self.layout.row(align=True)
|
row = self.layout.row(align=True)
|
||||||
row.label(text="No Profiles Available")
|
row.label(text="No Profiles Available")
|
||||||
@@ -391,7 +391,7 @@ class BIM_PT_object_material(Panel):
|
|||||||
else:
|
else:
|
||||||
row.label(text="Exterior")
|
row.label(text="Exterior")
|
||||||
|
|
||||||
def custom_offset(self):
|
def draw_custom_offset(self):
|
||||||
set_usage = ObjectMaterialData.data.get("set_usage", {})
|
set_usage = ObjectMaterialData.data.get("set_usage", {})
|
||||||
layer_set_direction = set_usage.get("layer_set_direction")
|
layer_set_direction = set_usage.get("layer_set_direction")
|
||||||
if layer_set_direction:
|
if layer_set_direction:
|
||||||
@@ -401,10 +401,15 @@ class BIM_PT_object_material(Panel):
|
|||||||
row = box.row(align=True)
|
row = box.row(align=True)
|
||||||
if layer_set_direction == "AXIS2":
|
if layer_set_direction == "AXIS2":
|
||||||
row.prop(self.props, "custom_wall_reference", text="Reference")
|
row.prop(self.props, "custom_wall_reference", text="Reference")
|
||||||
|
row.enabled = self.props.use_custom_offset
|
||||||
if layer_set_direction == "AXIS3":
|
if layer_set_direction == "AXIS3":
|
||||||
row.prop(self.props, "custom_slab_reference", text="Reference")
|
row.prop(self.props, "custom_slab_reference", text="Reference")
|
||||||
|
row.enabled = self.props.use_custom_offset
|
||||||
|
|
||||||
row = box.row(align=True)
|
row = box.row(align=True)
|
||||||
row.prop(self.props, "custom_offset", text="Custom Offset")
|
row.prop(self.props, "custom_offset", text="Custom Offset")
|
||||||
|
row.enabled = self.props.use_custom_offset
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class BIM_UL_materials(UIList):
|
class BIM_UL_materials(UIList):
|
||||||
|
|||||||
Reference in New Issue
Block a user