mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Launch workfiles app on Maya launch.
This commit is contained in:
parent
376ec3dedf
commit
2bc1f67fed
1 changed files with 11 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ from maya import utils, cmds, mel
|
|||
|
||||
from avalon import api as avalon, pipeline, maya
|
||||
from avalon.maya.pipeline import IS_HEADLESS
|
||||
from avalon.tools import workfiles
|
||||
from pyblish import api as pyblish
|
||||
|
||||
from ..lib import (
|
||||
|
|
@ -115,11 +116,21 @@ def on_init(_):
|
|||
override_toolbox_ui
|
||||
)
|
||||
safe_deferred(override_component_mask_commands)
|
||||
safe_deferred(launch_workfiles_app)
|
||||
|
||||
if not IS_HEADLESS:
|
||||
safe_deferred(override_toolbox_ui)
|
||||
|
||||
|
||||
def launch_workfiles_app(*args):
|
||||
workfiles.show(
|
||||
os.path.join(
|
||||
cmds.workspace(query=True, rootDirectory=True),
|
||||
cmds.workspace(fileRuleEntry="scene")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def on_before_save(return_code, _):
|
||||
"""Run validation for scene's FPS prior to saving"""
|
||||
return lib.validate_fps()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue