Add additional line to the ifc description popup to display the attribute type

This commit is contained in:
Gorgious
2022-10-31 10:43:50 +01:00
parent 757578a74b
commit 2ac27c6fdd
2 changed files with 3 additions and 0 deletions
@@ -690,6 +690,7 @@ class BIM_OT_show_description(bpy.types.Operator):
bl_idname = "bim.show_description"
bl_label = "Description"
ifc_class: bpy.props.StringProperty()
attr_name: bpy.props.StringProperty()
description: bpy.props.StringProperty()
def invoke(self, context, event):
@@ -701,6 +702,7 @@ class BIM_OT_show_description(bpy.types.Operator):
def draw(self, context):
layout = self.layout
layout.label(text=" - " + self.attr_name + " :")
wrapper = textwrap.TextWrapper(width=80)
for line in wrapper.wrap(self.description):
layout.label(text=line)
+1
View File
@@ -415,3 +415,4 @@ def draw_custom_context_menu(self, context):
op_description = layout.operator("bim.show_description", text="IFC Description", icon="INFO")
op_description.description = description
op_description.ifc_class = getattr(context.button_pointer, "ifc_class", "")
op_description.attr_name = getattr(context.button_pointer, "name", "")