mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
add supports for ayon settings
This commit is contained in:
parent
0403af298e
commit
12c8d3d2f8
2 changed files with 7 additions and 13 deletions
|
|
@ -650,14 +650,11 @@ def _convert_3dsmax_project_settings(ayon_settings, output):
|
|||
ayon_publish["ValidateAttributes"]["attributes"] = attributes
|
||||
|
||||
if "ValidateLoadedPlugin" in ayon_publish:
|
||||
new_plugin_mapping = {}
|
||||
loaded_plugin = (
|
||||
ayon_publish["ValidateLoadedPlugin"]
|
||||
ayon_publish["ValidateLoadedPlugin"]["family_plugins_mapping"]
|
||||
)
|
||||
for item in loaded_plugin["family_plugins_mapping"]:
|
||||
name = item.pop("name")
|
||||
new_plugin_mapping[name] = item
|
||||
loaded_plugin["family_plugins_mapping"] = new_plugin_mapping
|
||||
for item in loaded_plugin:
|
||||
item["families"] = item.pop("product_types")
|
||||
|
||||
output["max"] = ayon_max
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,10 @@ class ValidateAttributesModel(BaseSettingsModel):
|
|||
|
||||
class FamilyMappingItemModel(BaseSettingsModel):
|
||||
_layout = "compact"
|
||||
name: str = Field("", title="Product type")
|
||||
product_types: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Product Types"
|
||||
)
|
||||
plugins: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="Plugins"
|
||||
|
|
@ -44,12 +47,6 @@ class ValidateLoadedPluginModel(BaseSettingsModel):
|
|||
title="Family Plugins Mapping"
|
||||
)
|
||||
|
||||
# This is to validate unique names (like in dict)
|
||||
@validator("family_plugins_mapping")
|
||||
def validate_unique_outputs(cls, value):
|
||||
ensure_unique_names(value)
|
||||
return value
|
||||
|
||||
|
||||
class BasicValidateModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue