mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 11:12:47 +00:00
Improve UI
This commit is contained in:
@@ -27,12 +27,10 @@ class BIM_PT_patch(bpy.types.Panel):
|
|||||||
recipe = props.ifc_patch_recipes
|
recipe = props.ifc_patch_recipes
|
||||||
|
|
||||||
docs = extract_docs(ifcpatch, recipe, "Patcher", "__init__", ("src", "file", "logger", "args"))
|
docs = extract_docs(ifcpatch, recipe, "Patcher", "__init__", ("src", "file", "logger", "args"))
|
||||||
for line in docs["description"].split("\n"):
|
if "description" in docs:
|
||||||
layout.label(text=line)
|
col = layout.column(align=True)
|
||||||
except AttributeError as e:
|
for line in docs["description"].split("\n"):
|
||||||
print(e)
|
col.label(text=line)
|
||||||
except ModuleNotFoundError as e:
|
|
||||||
print("Error : " + str(e) + "in " + str(patcher))
|
|
||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(props, "ifc_patch_input")
|
row.prop(props, "ifc_patch_input")
|
||||||
@@ -44,7 +42,7 @@ class BIM_PT_patch(bpy.types.Panel):
|
|||||||
|
|
||||||
op = layout.operator(PopulatePatchArguments.bl_idname)
|
op = layout.operator(PopulatePatchArguments.bl_idname)
|
||||||
op.recipe = recipe
|
op.recipe = recipe
|
||||||
if props.ifc_patch_args_attr:
|
if props.ifc_patch_args_attr and bool(docs["inputs"]):
|
||||||
for attr in props.ifc_patch_args_attr:
|
for attr in props.ifc_patch_args_attr:
|
||||||
if attr.data_type == "string":
|
if attr.data_type == "string":
|
||||||
layout.row().prop(attr, "string_value", text=attr.description if attr.description else attr.name)
|
layout.row().prop(attr, "string_value", text=attr.description if attr.description else attr.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user