Moved invoke-calling execute function to AsyncModalOperatorMixin
because this is what you'd generally want from an async operator
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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."""
|
||||
|
||||
|
Reference in New Issue
Block a user