ayon-core/server_addon/maya/server/settings/scriptsmenu.py
Jakub Trllo 2b37b8af48
AYON: Addon settings in OpenPype (#5347)
* copied addons from 'ayon-addon-settings'

* added AE, photoshop and harmony addon

* moved openpype to subfolder

* cleanup repository files

* updated create package script and README.md

* formatting fixes

* added cli flags to be able keep server structure

* print progress and output dir

* another formatting fixes
2023-07-26 14:08:42 +02:00

43 lines
1.2 KiB
Python

from pydantic import Field
from ayon_server.settings import BaseSettingsModel
class ScriptsmenuSubmodel(BaseSettingsModel):
"""Item Definition"""
_isGroup = True
type: str = Field(title="Type")
command: str = Field(title="Command")
sourcetype: str = Field(title="Source Type")
title: str = Field(title="Title")
tooltip: str = Field(title="Tooltip")
tags: list[str] = Field(default_factory=list, title="A list of tags")
class ScriptsmenuModel(BaseSettingsModel):
_isGroup = True
name: str = Field(title="Menu Name")
definition: list[ScriptsmenuSubmodel] = Field(
default_factory=list,
title="Menu Definition",
description="Scriptmenu Items Definition"
)
DEFAULT_SCRIPTSMENU_SETTINGS = {
"name": "OpenPype Tools",
"definition": [
{
"type": "action",
"command": "import openpype.hosts.maya.api.commands as op_cmds; op_cmds.edit_shader_definitions()",
"sourcetype": "python",
"title": "Edit shader name definitions",
"tooltip": "Edit shader name definitions used in validation and renaming.",
"tags": [
"pipeline",
"shader"
]
}
]
}