mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 11:18:18 +00:00
Fix bug where IfcURIReference properties wouldn't display
This commit is contained in:
@@ -64,14 +64,14 @@ def draw_attribute(attribute, layout, copy_operator=None):
|
|||||||
text=attribute.name,
|
text=attribute.name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if attribute.is_uri:
|
||||||
|
op = layout.operator("bim.select_uri_attribute", text="", icon="FILE_FOLDER")
|
||||||
|
op.data_path = attribute.path_from_id("string_value")
|
||||||
if attribute.is_optional:
|
if attribute.is_optional:
|
||||||
layout.prop(attribute, "is_null", icon="RADIOBUT_OFF" if attribute.is_null else "RADIOBUT_ON", text="")
|
layout.prop(attribute, "is_null", icon="RADIOBUT_OFF" if attribute.is_null else "RADIOBUT_ON", text="")
|
||||||
if copy_operator:
|
if copy_operator:
|
||||||
op = layout.operator(f"{copy_operator}", text="", icon="COPYDOWN")
|
op = layout.operator(f"{copy_operator}", text="", icon="COPYDOWN")
|
||||||
op.name = attribute.name
|
op.name = attribute.name
|
||||||
if attribute.is_uri:
|
|
||||||
op = layout.operator("bim.select_uri_attribute", text="", icon="FILE_FOLDER")
|
|
||||||
op.data_path = attribute.path_from_id("string_value")
|
|
||||||
|
|
||||||
|
|
||||||
def import_attributes(ifc_class, props, data, callback=None):
|
def import_attributes(ifc_class, props, data, callback=None):
|
||||||
|
|||||||
@@ -51,14 +51,14 @@ def draw_single_property(prop, layout, copy_operator=None):
|
|||||||
value_name,
|
value_name,
|
||||||
text=prop.metadata.name,
|
text=prop.metadata.name,
|
||||||
)
|
)
|
||||||
|
if prop.metadata.is_uri:
|
||||||
|
op = layout.operator("bim.select_uri_attribute", text="", icon="FILE_FOLDER")
|
||||||
|
op.data_path = prop.metadata.path_from_id("string_value")
|
||||||
if prop.metadata.is_optional:
|
if prop.metadata.is_optional:
|
||||||
layout.prop(prop.metadata, "is_null", icon="RADIOBUT_OFF" if prop.metadata.is_null else "RADIOBUT_ON", text="")
|
layout.prop(prop.metadata, "is_null", icon="RADIOBUT_OFF" if prop.metadata.is_null else "RADIOBUT_ON", text="")
|
||||||
if copy_operator:
|
if copy_operator:
|
||||||
op = layout.operator(f"{copy_operator}", text="", icon="COPYDOWN")
|
op = layout.operator(f"{copy_operator}", text="", icon="COPYDOWN")
|
||||||
op.name = prop.metadata.name
|
op.name = prop.metadata.name
|
||||||
if prop.metadata.is_uri:
|
|
||||||
op = layout.operator("bim.select_uri_prop", text="", icon="FILE_FOLDER")
|
|
||||||
op.data_path = prop.metadata.path_from_id("string_value")
|
|
||||||
|
|
||||||
|
|
||||||
def draw_enumerated_property(prop, layout, copy_operator=None):
|
def draw_enumerated_property(prop, layout, copy_operator=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user