Moved invoke-calling execute function to AsyncModalOperatorMixin

because this is what you'd generally want from an async operator
This commit is contained in:
Sybren A. Stüvel 2016-07-22 12:48:50 +02:00
parent 56b622a723
commit 9bc8c30443
2 changed files with 3 additions and 3 deletions

View File

@ -184,6 +184,9 @@ class AsyncModalOperatorMixin:
self.timer = context.window_manager.event_timer_add(1 / 15, context.window) self.timer = context.window_manager.event_timer_add(1 / 15, context.window)
return {'RUNNING_MODAL'} return {'RUNNING_MODAL'}
def execute(self, context):
return self.invoke(context, None)
def modal(self, context, event): def modal(self, context, event):
task = self.async_task task = self.async_task

View File

@ -113,9 +113,6 @@ class PILLAR_OT_image_share(pillar.PillarOperatorMixin,
self._new_async_task(self.async_execute(context)) self._new_async_task(self.async_execute(context))
return {'RUNNING_MODAL'} return {'RUNNING_MODAL'}
def execute(self, context):
return self.invoke(context, None)
async def async_execute(self, context): async def async_execute(self, context):
"""Entry point of the asynchronous operator.""" """Entry point of the asynchronous operator."""