mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge pull request #5570 from BigRoy/chore/maya_remove_publish_gui_filters
Chore: Maya / Nuke remove publish gui filters from settings
This commit is contained in:
commit
e46e76254e
13 changed files with 9 additions and 153 deletions
|
|
@ -478,15 +478,6 @@ def _convert_maya_project_settings(ayon_settings, output):
|
|||
for item in ayon_maya["ext_mapping"]
|
||||
}
|
||||
|
||||
# Publish UI filters
|
||||
new_filters = {}
|
||||
for item in ayon_maya["filters"]:
|
||||
new_filters[item["name"]] = {
|
||||
subitem["name"]: subitem["value"]
|
||||
for subitem in item["value"]
|
||||
}
|
||||
ayon_maya["filters"] = new_filters
|
||||
|
||||
# Maya dirmap
|
||||
ayon_maya_dirmap = ayon_maya.pop("maya_dirmap")
|
||||
ayon_maya_dirmap_path = ayon_maya_dirmap["paths"]
|
||||
|
|
@ -743,16 +734,6 @@ def _convert_nuke_project_settings(ayon_settings, output):
|
|||
dirmap["paths"][dst_key] = dirmap["paths"].pop(src_key)
|
||||
ayon_nuke["nuke-dirmap"] = dirmap
|
||||
|
||||
# --- Filters ---
|
||||
new_gui_filters = {}
|
||||
for item in ayon_nuke.pop("filters"):
|
||||
subvalue = {}
|
||||
key = item["name"]
|
||||
for subitem in item["value"]:
|
||||
subvalue[subitem["name"]] = subitem["value"]
|
||||
new_gui_filters[key] = subvalue
|
||||
ayon_nuke["filters"] = new_gui_filters
|
||||
|
||||
# --- Load ---
|
||||
ayon_load = ayon_nuke["load"]
|
||||
ayon_load["LoadClip"]["_representations"] = (
|
||||
|
|
@ -896,7 +877,7 @@ def _convert_hiero_project_settings(ayon_settings, output):
|
|||
_convert_host_imageio(ayon_hiero)
|
||||
|
||||
new_gui_filters = {}
|
||||
for item in ayon_hiero.pop("filters"):
|
||||
for item in ayon_hiero.pop("filters", []):
|
||||
subvalue = {}
|
||||
key = item["name"]
|
||||
for subitem in item["value"]:
|
||||
|
|
@ -963,17 +944,6 @@ def _convert_tvpaint_project_settings(ayon_settings, output):
|
|||
|
||||
_convert_host_imageio(ayon_tvpaint)
|
||||
|
||||
filters = {}
|
||||
for item in ayon_tvpaint["filters"]:
|
||||
value = item["value"]
|
||||
try:
|
||||
value = json.loads(value)
|
||||
|
||||
except ValueError:
|
||||
value = {}
|
||||
filters[item["name"]] = value
|
||||
ayon_tvpaint["filters"] = filters
|
||||
|
||||
ayon_publish_settings = ayon_tvpaint["publish"]
|
||||
for plugin_name in (
|
||||
"ValidateProjectSettings",
|
||||
|
|
|
|||
|
|
@ -1608,14 +1608,5 @@
|
|||
},
|
||||
"templated_workfile_build": {
|
||||
"profiles": []
|
||||
},
|
||||
"filters": {
|
||||
"preset 1": {
|
||||
"ValidateNoAnimation": false,
|
||||
"ValidateShapeDefaultNames": false
|
||||
},
|
||||
"preset 2": {
|
||||
"ValidateNoAnimation": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -540,6 +540,5 @@
|
|||
},
|
||||
"templated_workfile_build": {
|
||||
"profiles": []
|
||||
},
|
||||
"filters": {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,5 @@
|
|||
"workfile_builder": {
|
||||
"create_first_version": false,
|
||||
"custom_templates": []
|
||||
},
|
||||
"filters": {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,10 +258,6 @@
|
|||
{
|
||||
"type": "schema",
|
||||
"name": "schema_templated_workfile_build"
|
||||
},
|
||||
{
|
||||
"type": "schema",
|
||||
"name": "schema_publish_gui_filter"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -291,10 +291,6 @@
|
|||
{
|
||||
"type": "schema",
|
||||
"name": "schema_templated_workfile_build"
|
||||
},
|
||||
{
|
||||
"type": "schema",
|
||||
"name": "schema_publish_gui_filter"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -436,10 +436,6 @@
|
|||
"workfile_builder/builder_on_start",
|
||||
"workfile_builder/profiles"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "schema",
|
||||
"name": "schema_publish_gui_filter"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,23 +23,6 @@ class ExtMappingItemModel(BaseSettingsModel):
|
|||
value: str = Field(title="Extension")
|
||||
|
||||
|
||||
class PublishGUIFilterItemModel(BaseSettingsModel):
|
||||
_layout = "compact"
|
||||
name: str = Field(title="Name")
|
||||
value: bool = Field(True, title="Active")
|
||||
|
||||
|
||||
class PublishGUIFiltersModel(BaseSettingsModel):
|
||||
_layout = "compact"
|
||||
name: str = Field(title="Name")
|
||||
value: list[PublishGUIFilterItemModel] = Field(default_factory=list)
|
||||
|
||||
@validator("value")
|
||||
def validate_unique_outputs(cls, value):
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
||||
|
||||
class MayaSettings(BaseSettingsModel):
|
||||
"""Maya Project Settings."""
|
||||
|
||||
|
|
@ -76,11 +59,8 @@ class MayaSettings(BaseSettingsModel):
|
|||
templated_workfile_build: TemplatedProfilesModel = Field(
|
||||
default_factory=TemplatedProfilesModel,
|
||||
title="Templated Workfile Build Settings")
|
||||
filters: list[PublishGUIFiltersModel] = Field(
|
||||
default_factory=list,
|
||||
title="Publish GUI Filters")
|
||||
|
||||
@validator("filters", "ext_mapping")
|
||||
@validator("ext_mapping")
|
||||
def validate_unique_outputs(cls, value):
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
|
@ -123,20 +103,5 @@ DEFAULT_MAYA_SETTING = {
|
|||
"publish": DEFAULT_PUBLISH_SETTINGS,
|
||||
"load": DEFAULT_LOADERS_SETTING,
|
||||
"workfile_build": DEFAULT_WORKFILE_SETTING,
|
||||
"templated_workfile_build": DEFAULT_TEMPLATED_WORKFILE_SETTINGS,
|
||||
"filters": [
|
||||
{
|
||||
"name": "preset 1",
|
||||
"value": [
|
||||
{"name": "ValidateNoAnimation", "value": False},
|
||||
{"name": "ValidateShapeDefaultNames", "value": False},
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "preset 2",
|
||||
"value": [
|
||||
{"name": "ValidateNoAnimation", "value": False},
|
||||
]
|
||||
},
|
||||
]
|
||||
"templated_workfile_build": DEFAULT_TEMPLATED_WORKFILE_SETTINGS
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
from pydantic import Field, validator
|
||||
from ayon_server.settings import BaseSettingsModel, ensure_unique_names
|
||||
|
||||
|
||||
class PublishGUIFilterItemModel(BaseSettingsModel):
|
||||
_layout = "compact"
|
||||
name: str = Field(title="Name")
|
||||
value: bool = Field(True, title="Active")
|
||||
|
||||
|
||||
class PublishGUIFiltersModel(BaseSettingsModel):
|
||||
_layout = "compact"
|
||||
name: str = Field(title="Name")
|
||||
value: list[PublishGUIFilterItemModel] = Field(default_factory=list)
|
||||
|
||||
@validator("value")
|
||||
def validate_unique_outputs(cls, value):
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
|
@ -44,7 +44,6 @@ from .workfile_builder import (
|
|||
from .templated_workfile_build import (
|
||||
TemplatedWorkfileBuildModel
|
||||
)
|
||||
from .filters import PublishGUIFilterItemModel
|
||||
|
||||
|
||||
class NukeSettings(BaseSettingsModel):
|
||||
|
|
@ -98,16 +97,6 @@ class NukeSettings(BaseSettingsModel):
|
|||
default_factory=TemplatedWorkfileBuildModel
|
||||
)
|
||||
|
||||
filters: list[PublishGUIFilterItemModel] = Field(
|
||||
default_factory=list
|
||||
)
|
||||
|
||||
@validator("filters")
|
||||
def ensure_unique_names(cls, value):
|
||||
"""Ensure name fields within the lists have unique names."""
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
||||
|
||||
DEFAULT_VALUES = {
|
||||
"general": DEFAULT_GENERAL_SETTINGS,
|
||||
|
|
@ -121,6 +110,5 @@ DEFAULT_VALUES = {
|
|||
"workfile_builder": DEFAULT_WORKFILE_BUILDER_SETTINGS,
|
||||
"templated_workfile_build": {
|
||||
"profiles": []
|
||||
},
|
||||
"filters": []
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.7"
|
||||
__version__ = "0.1.8"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from pydantic import Field, validator
|
||||
from pydantic import Field
|
||||
from ayon_server.settings import (
|
||||
BaseSettingsModel,
|
||||
ensure_unique_names,
|
||||
|
|
@ -14,23 +14,6 @@ from .publish_plugins import (
|
|||
)
|
||||
|
||||
|
||||
class PublishGUIFilterItemModel(BaseSettingsModel):
|
||||
_layout = "compact"
|
||||
name: str = Field(title="Name")
|
||||
value: bool = Field(True, title="Active")
|
||||
|
||||
|
||||
class PublishGUIFiltersModel(BaseSettingsModel):
|
||||
_layout = "compact"
|
||||
name: str = Field(title="Name")
|
||||
value: list[PublishGUIFilterItemModel] = Field(default_factory=list)
|
||||
|
||||
@validator("value")
|
||||
def validate_unique_outputs(cls, value):
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
||||
|
||||
class TvpaintSettings(BaseSettingsModel):
|
||||
imageio: TVPaintImageIOModel = Field(
|
||||
default_factory=TVPaintImageIOModel,
|
||||
|
|
@ -52,14 +35,6 @@ class TvpaintSettings(BaseSettingsModel):
|
|||
default_factory=WorkfileBuilderPlugin,
|
||||
title="Workfile Builder"
|
||||
)
|
||||
filters: list[PublishGUIFiltersModel] = Field(
|
||||
default_factory=list,
|
||||
title="Publish GUI Filters")
|
||||
|
||||
@validator("filters")
|
||||
def validate_unique_outputs(cls, value):
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
||||
|
||||
DEFAULT_VALUES = {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.0"
|
||||
__version__ = "0.1.1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue