mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
Add additional line to the ifc description popup to display the attribute type
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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", "")
|
||||
|
||||
Reference in New Issue
Block a user