From 0dd55e46a7fcbca6a62846f5b43e835778c6b682 Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Mon, 22 Jul 2024 01:28:59 -0700 Subject: [PATCH] Added poll operator to the ASE exporter --- io_scene_ase/exporter.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/io_scene_ase/exporter.py b/io_scene_ase/exporter.py index a647037..c230df5 100644 --- a/io_scene_ase/exporter.py +++ b/io_scene_ase/exporter.py @@ -100,6 +100,13 @@ class ASE_OT_export(Operator, ExportHelper): default='EVALUATED' ) + @classmethod + def poll(cls, context): + if not any(x.type == 'MESH' for x in context.selected_objects): + cls.poll_message_set('At least one mesh must be selected') + return False + return True + def draw(self, context): layout = self.layout