From a345f86e3395e1ff19cc502e893cfce95f170807 Mon Sep 17 00:00:00 2001 From: quackarooni Date: Wed, 9 Apr 2025 10:17:41 +0200 Subject: [PATCH] Fix #137169: "Panel Toggle" poll errors if a panel's first child item is a panel The poll function for `NODE_PT_node_tree_interface_panel_toggle` looks at the first child item and checks if it has the `is_panel_toggle` property set to `True`. This fails if the first child is a panel, which doesn't have that property. The fix is to simply fall back to returning False if the first child item does not have the aforementioned property. Pull Request: https://projects.blender.org/blender/blender/pulls/137171 --- scripts/startup/bl_ui/space_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/startup/bl_ui/space_node.py b/scripts/startup/bl_ui/space_node.py index 6044a508ebf..99925850897 100644 --- a/scripts/startup/bl_ui/space_node.py +++ b/scripts/startup/bl_ui/space_node.py @@ -1007,7 +1007,7 @@ class NODE_PT_node_tree_interface_panel_toggle(Panel): if not active_item.interface_items: return False first_item = active_item.interface_items[0] - return first_item.is_panel_toggle + return getattr(first_item, "is_panel_toggle", False) def draw(self, context): layout = self.layout