mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
action _launch method modified to make more sence
This commit is contained in:
parent
2fc6aafecf
commit
28c737f375
1 changed files with 4 additions and 8 deletions
|
|
@ -58,28 +58,24 @@ class BaseAction(BaseHandler):
|
||||||
)
|
)
|
||||||
|
|
||||||
def _launch(self, event):
|
def _launch(self, event):
|
||||||
args = self._translate_event(
|
entities = self._translate_event(event)
|
||||||
self.session, event
|
|
||||||
)
|
|
||||||
|
|
||||||
preactions_launched = self._handle_preactions(self.session, event)
|
preactions_launched = self._handle_preactions(self.session, event)
|
||||||
if preactions_launched is False:
|
if preactions_launched is False:
|
||||||
return
|
return
|
||||||
|
|
||||||
interface = self._interface(
|
interface = self._interface(
|
||||||
self.session, *args
|
self.session, entities, event
|
||||||
)
|
)
|
||||||
|
|
||||||
if interface:
|
if interface:
|
||||||
return interface
|
return interface
|
||||||
|
|
||||||
response = self.launch(
|
response = self.launch(
|
||||||
self.session, *args
|
self.session, entities, event
|
||||||
)
|
)
|
||||||
|
|
||||||
return self._handle_result(
|
return self._handle_result(response)
|
||||||
self.session, response, *args
|
|
||||||
)
|
|
||||||
|
|
||||||
def _handle_result(self, session, result, entities, event):
|
def _handle_result(self, session, result, entities, event):
|
||||||
'''Validate the returned result from the action callback'''
|
'''Validate the returned result from the action callback'''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue