mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
add version up workfile in ayon menu which is located inside the workfiles in core addon
This commit is contained in:
parent
39ca9922bb
commit
e523b47412
2 changed files with 18 additions and 8 deletions
|
|
@ -75,12 +75,13 @@ def install(project_settings):
|
|||
|
||||
cmds.setParent("..", menu=True)
|
||||
|
||||
if project_settings["core"]["tools"]["Workfiles"].get("version_up_workfile"):
|
||||
cmds.menuItem(divider=True)
|
||||
cmds.menuItem(
|
||||
"Version Up Workfile",
|
||||
command=lambda *args: version_up_workfile()
|
||||
)
|
||||
if project_settings["core"]["tools"]["Workfiles"]["ayon_menu"].get(
|
||||
"version_up_workfile"):
|
||||
cmds.menuItem(divider=True)
|
||||
cmds.menuItem(
|
||||
"Version Up Workfile",
|
||||
command=lambda *args: version_up_workfile()
|
||||
)
|
||||
|
||||
cmds.menuItem(divider=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -118,12 +118,19 @@ class WorkfilesLockProfile(BaseSettingsModel):
|
|||
enabled: bool = SettingsField(True, title="Enabled")
|
||||
|
||||
|
||||
class WorkfilesToolModel(BaseSettingsModel):
|
||||
class AyonMenuModel(BaseSettingsModel):
|
||||
version_up_workfile: bool = SettingsField(
|
||||
False,
|
||||
title="Version Up Workfile",
|
||||
description="Add 'Version Up Workfile' to AYON menu"
|
||||
)
|
||||
|
||||
|
||||
class WorkfilesToolModel(BaseSettingsModel):
|
||||
ayon_menu: AyonMenuModel = SettingsField(
|
||||
default_factory=AyonMenuModel,
|
||||
title="AYON Menu"
|
||||
)
|
||||
workfile_template_profiles: list[WorkfileTemplateProfile] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Workfile template profiles"
|
||||
|
|
@ -412,7 +419,9 @@ DEFAULT_TOOLS_VALUES = {
|
|||
]
|
||||
},
|
||||
"Workfiles": {
|
||||
"version_up_workfile": False,
|
||||
"ayon_menu": {
|
||||
"version_up_workfile": False
|
||||
},
|
||||
"workfile_template_profiles": [
|
||||
{
|
||||
"task_types": [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue