mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
re-arrange settings files
This commit is contained in:
parent
067aa2ca4d
commit
519db56b87
5 changed files with 141 additions and 137 deletions
|
|
@ -1,5 +1,4 @@
|
|||
from pydantic import Field
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ class CreateStaticMeshModel(BaseSettingsModel):
|
|||
class CreatePluginsModel(BaseSettingsModel):
|
||||
CreateArnoldAss: CreateArnoldAssModel = Field(
|
||||
default_factory=CreateArnoldAssModel,
|
||||
title="Create Alembic Camera")
|
||||
title="Create Arnold Ass")
|
||||
# "-" is not compatible in the new model
|
||||
CreateStaticMesh: CreateStaticMeshModel = Field(
|
||||
default_factory=CreateStaticMeshModel,
|
||||
|
|
@ -135,85 +134,3 @@ DEFAULT_HOUDINI_CREATE_SETTINGS = {
|
|||
"default_variants": ["Main"]
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
# Publish Plugins
|
||||
class ValidateWorkfilePathsModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
node_types: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Node Types"
|
||||
)
|
||||
prohibited_vars: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Prohibited Variables"
|
||||
)
|
||||
|
||||
|
||||
class BasicValidateModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
active: bool = Field(title="Active")
|
||||
|
||||
|
||||
class PublishPluginsModel(BaseSettingsModel):
|
||||
ValidateWorkfilePaths: ValidateWorkfilePathsModel = Field(
|
||||
default_factory=ValidateWorkfilePathsModel,
|
||||
title="Validate workfile paths settings.")
|
||||
ValidateReviewColorspace: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Review Colorspace.")
|
||||
ValidateContainers: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Latest Containers.")
|
||||
ValidateSubsetName: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Subset Name.")
|
||||
ValidateMeshIsStatic: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Mesh is Static.")
|
||||
ValidateUnrealStaticMeshName: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Unreal Static Mesh Name.")
|
||||
|
||||
|
||||
DEFAULT_HOUDINI_PUBLISH_SETTINGS = {
|
||||
"ValidateWorkfilePaths": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"node_types": [
|
||||
"file",
|
||||
"alembic"
|
||||
],
|
||||
"prohibited_vars": [
|
||||
"$HIP",
|
||||
"$JOB"
|
||||
]
|
||||
},
|
||||
"ValidateReviewColorspace": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateContainers": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateSubsetName": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateMeshIsStatic": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateUnrealStaticMeshName": {
|
||||
"enabled": False,
|
||||
"optional": True,
|
||||
"active": True
|
||||
}
|
||||
}
|
||||
|
|
@ -1,57 +1,19 @@
|
|||
from pydantic import Field
|
||||
from ayon_server.settings import (
|
||||
BaseSettingsModel,
|
||||
MultiplatformPathModel,
|
||||
MultiplatformPathListModel,
|
||||
)
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from .general import (
|
||||
GeneralSettingsModel,
|
||||
DEFAULT_GENERAL_SETTINGS
|
||||
)
|
||||
from .imageio import HoudiniImageIOModel
|
||||
from .publish_plugins import (
|
||||
PublishPluginsModel,
|
||||
from .shelves import ShelvesModel
|
||||
from .create import (
|
||||
CreatePluginsModel,
|
||||
DEFAULT_HOUDINI_PUBLISH_SETTINGS,
|
||||
DEFAULT_HOUDINI_CREATE_SETTINGS
|
||||
)
|
||||
|
||||
|
||||
class ShelfToolsModel(BaseSettingsModel):
|
||||
name: str = Field(title="Name")
|
||||
help: str = Field(title="Help text")
|
||||
script: MultiplatformPathModel = Field(
|
||||
default_factory=MultiplatformPathModel,
|
||||
title="Script Path "
|
||||
)
|
||||
icon: MultiplatformPathModel = Field(
|
||||
default_factory=MultiplatformPathModel,
|
||||
title="Icon Path "
|
||||
)
|
||||
|
||||
|
||||
class ShelfDefinitionModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
shelf_name: str = Field(title="Shelf name")
|
||||
tools_list: list[ShelfToolsModel] = Field(
|
||||
default_factory=list,
|
||||
title="Shelf Tools"
|
||||
)
|
||||
|
||||
|
||||
class ShelvesModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
shelf_set_name: str = Field(title="Shelfs set name")
|
||||
|
||||
shelf_set_source_path: MultiplatformPathListModel = Field(
|
||||
default_factory=MultiplatformPathListModel,
|
||||
title="Shelf Set Path (optional)"
|
||||
)
|
||||
|
||||
shelf_definition: list[ShelfDefinitionModel] = Field(
|
||||
default_factory=list,
|
||||
title="Shelf Definitions"
|
||||
)
|
||||
from .publish import (
|
||||
PublishPluginsModel,
|
||||
DEFAULT_HOUDINI_PUBLISH_SETTINGS,
|
||||
)
|
||||
|
||||
|
||||
class HoudiniSettings(BaseSettingsModel):
|
||||
|
|
@ -65,18 +27,16 @@ class HoudiniSettings(BaseSettingsModel):
|
|||
)
|
||||
shelves: list[ShelvesModel] = Field(
|
||||
default_factory=list,
|
||||
title="Houdini Scripts Shelves",
|
||||
title="Shelves Manager",
|
||||
)
|
||||
|
||||
publish: PublishPluginsModel = Field(
|
||||
default_factory=PublishPluginsModel,
|
||||
title="Publish Plugins",
|
||||
)
|
||||
|
||||
create: CreatePluginsModel = Field(
|
||||
default_factory=CreatePluginsModel,
|
||||
title="Creator Plugins",
|
||||
)
|
||||
publish: PublishPluginsModel = Field(
|
||||
default_factory=PublishPluginsModel,
|
||||
title="Publish Plugins",
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_VALUES = {
|
||||
|
|
|
|||
84
server_addon/houdini/server/settings/publish.py
Normal file
84
server_addon/houdini/server/settings/publish.py
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
from pydantic import Field
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
|
||||
|
||||
# Publish Plugins
|
||||
class ValidateWorkfilePathsModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
node_types: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Node Types"
|
||||
)
|
||||
prohibited_vars: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Prohibited Variables"
|
||||
)
|
||||
|
||||
|
||||
class BasicValidateModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
active: bool = Field(title="Active")
|
||||
|
||||
|
||||
class PublishPluginsModel(BaseSettingsModel):
|
||||
ValidateWorkfilePaths: ValidateWorkfilePathsModel = Field(
|
||||
default_factory=ValidateWorkfilePathsModel,
|
||||
title="Validate workfile paths settings.")
|
||||
ValidateReviewColorspace: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Review Colorspace.")
|
||||
ValidateContainers: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Latest Containers.")
|
||||
ValidateSubsetName: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Subset Name.")
|
||||
ValidateMeshIsStatic: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Mesh is Static.")
|
||||
ValidateUnrealStaticMeshName: BasicValidateModel = Field(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Unreal Static Mesh Name.")
|
||||
|
||||
|
||||
DEFAULT_HOUDINI_PUBLISH_SETTINGS = {
|
||||
"ValidateWorkfilePaths": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"node_types": [
|
||||
"file",
|
||||
"alembic"
|
||||
],
|
||||
"prohibited_vars": [
|
||||
"$HIP",
|
||||
"$JOB"
|
||||
]
|
||||
},
|
||||
"ValidateReviewColorspace": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateContainers": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateSubsetName": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateMeshIsStatic": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateUnrealStaticMeshName": {
|
||||
"enabled": False,
|
||||
"optional": True,
|
||||
"active": True
|
||||
}
|
||||
}
|
||||
43
server_addon/houdini/server/settings/shelves.py
Normal file
43
server_addon/houdini/server/settings/shelves.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
from pydantic import Field
|
||||
from ayon_server.settings import (
|
||||
BaseSettingsModel,
|
||||
MultiplatformPathModel,
|
||||
MultiplatformPathListModel,
|
||||
)
|
||||
|
||||
|
||||
class ShelfToolsModel(BaseSettingsModel):
|
||||
name: str = Field(title="Name")
|
||||
help: str = Field(title="Help text")
|
||||
script: MultiplatformPathModel = Field(
|
||||
default_factory=MultiplatformPathModel,
|
||||
title="Script Path "
|
||||
)
|
||||
icon: MultiplatformPathModel = Field(
|
||||
default_factory=MultiplatformPathModel,
|
||||
title="Icon Path "
|
||||
)
|
||||
|
||||
|
||||
class ShelfDefinitionModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
shelf_name: str = Field(title="Shelf name")
|
||||
tools_list: list[ShelfToolsModel] = Field(
|
||||
default_factory=list,
|
||||
title="Shelf Tools"
|
||||
)
|
||||
|
||||
|
||||
class ShelvesModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
shelf_set_name: str = Field(title="Shelfs set name")
|
||||
|
||||
shelf_set_source_path: MultiplatformPathListModel = Field(
|
||||
default_factory=MultiplatformPathListModel,
|
||||
title="Shelf Set Path (optional)"
|
||||
)
|
||||
|
||||
shelf_definition: list[ShelfDefinitionModel] = Field(
|
||||
default_factory=list,
|
||||
title="Shelf Definitions"
|
||||
)
|
||||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.4"
|
||||
__version__ = "0.1.5"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue