From ae726606eb79304a07cf361b6fc813da74b3bdd7 Mon Sep 17 00:00:00 2001 From: Vincent Marchetti Date: Mon, 28 Oct 2024 21:37:33 -0400 Subject: [PATCH] Defined a classmethod poll for the class X3D_PT_import_general --- source/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/__init__.py b/source/__init__.py index 5a1dd34..9fe34f4 100644 --- a/source/__init__.py +++ b/source/__init__.py @@ -321,6 +321,14 @@ class X3D_PT_import_general(bpy.types.Panel): bl_label = "General" bl_parent_id = "FILE_PT_operator" + @classmethod + def poll(cls, context): + sfile = context.space_data + operator = sfile.active_operator + + return operator.bl_idname == "IMPORT_SCENE_OT_x3d" + + def draw(self, context): layout = self.layout layout.use_property_split = True -- 2.30.2