mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Fix scope defaults, fix order to int and enforce name to not be empty
This commit is contained in:
parent
362995d5f7
commit
19f84805bd
1 changed files with 11 additions and 4 deletions
|
|
@ -83,14 +83,21 @@ def usd_contribution_layer_types():
|
||||||
|
|
||||||
class ContributionLayersModel(BaseSettingsModel):
|
class ContributionLayersModel(BaseSettingsModel):
|
||||||
_layout = "compact"
|
_layout = "compact"
|
||||||
name: str = SettingsField(title="Name")
|
name: str = SettingsField(
|
||||||
|
default="",
|
||||||
|
regex="[A-Za-z0-9_-]+",
|
||||||
|
title="Name")
|
||||||
scope: list[str] = SettingsField(
|
scope: list[str] = SettingsField(
|
||||||
|
default_factory=list,
|
||||||
title="Scope",
|
title="Scope",
|
||||||
enum_resolver=usd_contribution_layer_types)
|
enum_resolver=usd_contribution_layer_types)
|
||||||
order: str = SettingsField(
|
order: int = SettingsField(
|
||||||
|
default=0,
|
||||||
title="Order",
|
title="Order",
|
||||||
description="Higher order means a higher strength and stacks the "
|
description=(
|
||||||
"layer on top.")
|
"Higher order means a higher strength and stacks the layer on top."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class CollectUSDLayerContributionsProfileModel(BaseSettingsModel):
|
class CollectUSDLayerContributionsProfileModel(BaseSettingsModel):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue