From 3f4a0128c7e9ad88b32a645dab12667d44a1159b Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 28 Oct 2024 11:18:18 +0500 Subject: [PATCH] ifcsverchok - fix poll error opening operator search --- src/ifcsverchok/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcsverchok/__init__.py b/src/ifcsverchok/__init__.py index d3d12aef20..73fb78ad9a 100644 --- a/src/ifcsverchok/__init__.py +++ b/src/ifcsverchok/__init__.py @@ -183,7 +183,10 @@ class IFC_Sv_write_file(bpy.types.Operator): @classmethod def poll(cls, context): - return any("IFC" in n for n in context.space_data.edit_tree.nodes.keys()) + space = context.space_data + if not isinstance(space, bpy.types.SpaceNodeEditor): + return False + return any("IFC" in n for n in space.edit_tree.nodes.keys()) def ensure_hirarchy(self, file: ifcopenshell.file) -> None: elements_in_buildings: set[ifcopenshell.entity_instance] = set()