From 9bc8c30443202e61c2e7b612ee6a8e7d61c1d17e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 22 Jul 2016 12:48:50 +0200 Subject: [PATCH] Moved invoke-calling execute function to AsyncModalOperatorMixin because this is what you'd generally want from an async operator --- blender_cloud/async_loop.py | 3 +++ blender_cloud/image_sharing.py | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blender_cloud/async_loop.py b/blender_cloud/async_loop.py index 2fcb249..6fdbb5f 100644 --- a/blender_cloud/async_loop.py +++ b/blender_cloud/async_loop.py @@ -184,6 +184,9 @@ class AsyncModalOperatorMixin: self.timer = context.window_manager.event_timer_add(1 / 15, context.window) return {'RUNNING_MODAL'} + def execute(self, context): + return self.invoke(context, None) + def modal(self, context, event): task = self.async_task diff --git a/blender_cloud/image_sharing.py b/blender_cloud/image_sharing.py index 5bc129e..9a760d9 100644 --- a/blender_cloud/image_sharing.py +++ b/blender_cloud/image_sharing.py @@ -113,9 +113,6 @@ class PILLAR_OT_image_share(pillar.PillarOperatorMixin, self._new_async_task(self.async_execute(context)) return {'RUNNING_MODAL'} - def execute(self, context): - return self.invoke(context, None) - async def async_execute(self, context): """Entry point of the asynchronous operator."""