mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merge pull request #5804 from ynput/enhancement/timer-plugin-using-data-from-context
TimersManager: Use available data to get context info
This commit is contained in:
commit
ec362982ef
1 changed files with 3 additions and 5 deletions
|
|
@ -6,8 +6,6 @@ Requires:
|
|||
|
||||
import pyblish.api
|
||||
|
||||
from openpype.pipeline import legacy_io
|
||||
|
||||
|
||||
class StartTimer(pyblish.api.ContextPlugin):
|
||||
label = "Start Timer"
|
||||
|
|
@ -25,9 +23,9 @@ class StartTimer(pyblish.api.ContextPlugin):
|
|||
self.log.debug("Publish is not affecting running timers.")
|
||||
return
|
||||
|
||||
project_name = legacy_io.active_project()
|
||||
asset_name = legacy_io.Session.get("AVALON_ASSET")
|
||||
task_name = legacy_io.Session.get("AVALON_TASK")
|
||||
project_name = context.data["projectName"]
|
||||
asset_name = context.data.get("asset")
|
||||
task_name = context.data.get("task")
|
||||
if not project_name or not asset_name or not task_name:
|
||||
self.log.info((
|
||||
"Current context does not contain all"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue