By accident not commited `attr = context.button_pointer` line that was leading to console errors
This commit is contained in:
Andrej730
2024-12-23 11:35:43 +05:00
parent cb0fdbec66
commit 09b4681413
+5 -4
View File
@@ -1139,13 +1139,14 @@ def draw_custom_context_menu(self: bpy.types.Menu, context: bpy.types.Context) -
layout = self.layout
if isinstance(context.button_pointer, Attribute):
description = getattr(context.button_pointer, "description", None)
ifc_class = getattr(context.button_pointer, "ifc_class", "")
attr = context.button_pointer
description = attr.description
ifc_class = attr.ifc_class
if ifc_class:
try:
url = get_entity_doc(version, context.button_pointer.ifc_class).get("spec_url", "")
url = get_entity_doc(version, ifc_class).get("spec_url", "")
except RuntimeError: # It's not an Entity Attribute. Let's try a Property Set attribute.
doc = get_property_set_doc(version, context.button_pointer.ifc_class)
doc = get_property_set_doc(version, ifc_class)
if doc:
url = doc.get("spec_url", "")
else: # It's a custom property set. No URL available