mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
* 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
41 lines
1.2 KiB
Python
41 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")
|
|
|
|
|
|
class ScriptsmenuSettings(BaseSettingsModel):
|
|
"""Nuke script menu project settings."""
|
|
_isGroup = True
|
|
|
|
"""# TODO: enhance settings with host api:
|
|
- in api rename key `name` to `menu_name`
|
|
"""
|
|
name: str = Field(title="Menu name")
|
|
definition: list[ScriptsmenuSubmodel] = Field(
|
|
default_factory=list,
|
|
title="Definition",
|
|
description="Scriptmenu Items Definition")
|
|
|
|
|
|
DEFAULT_SCRIPTSMENU_SETTINGS = {
|
|
"name": "OpenPype Tools",
|
|
"definition": [
|
|
{
|
|
"type": "action",
|
|
"sourcetype": "python",
|
|
"title": "OpenPype Docs",
|
|
"command": "import webbrowser;webbrowser.open(url='https://openpype.io/docs/artist_hosts_hiero')",
|
|
"tooltip": "Open the OpenPype Hiero user doc page"
|
|
}
|
|
]
|
|
}
|