Add description field

This commit is contained in:
Gorgious
2022-01-23 23:36:57 +01:00
parent 26db0d60c1
commit 10123da51d
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -94,11 +94,17 @@ def import_attribute(attribute, props, data, callback=None):
new.doc.ifc_id = data["id"]
new.doc.ifc_class = data["type"]
new.doc.doc_url = get_ifc_class_doc_url(new.doc.ifc_class)
new.doc.description = get_ifc_description(attribute.name())
for line in get_ifc_class_usecase(new.doc.ifc_class):
new_usecase_line = new.doc.use_case.add()
new_usecase_line.name = line
def get_ifc_description(property_name):
# TODO : Implement fetching descriptipn from property name
return "This describes what this fields means"
def get_ifc_class_doc_url(class_name):
# TODO : Implement fetching doc url
return "https://github.com/IfcOpenShell/IfcOpenShell"
+1
View File
@@ -177,6 +177,7 @@ class AttributeDocumentation(PropertyGroup):
ifc_id: IntProperty(name="ID")
doc_url: StringProperty(name="URL")
use_case: CollectionProperty(name="Use Case", type=StrProperty)
description: StringProperty(name="Description")
def draw(self, layout):
row = layout.row()