♻️ move the setting one level up

This commit is contained in:
Ondřej Samohel 2024-08-09 13:18:16 +02:00
parent a394556103
commit c63d2005cf
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
2 changed files with 9 additions and 8 deletions

View file

@ -699,7 +699,7 @@ def _create_instances_for_aov(instance, skeleton, aov_filter, additional_data,
use_legacy_product_name = True
try:
use_legacy_product_name = project_settings["core"]["tools"]["creator"]["product_name_profiles"]["use_legacy_for_renders"] # noqa: E501
use_legacy_product_name = project_settings["core"]["tools"]["creator"]["use_legacy_product_names_for_renders"] # noqa: E501
except KeyError:
warnings.warn(
("use_legacy_for_renders not found in project settings. "

View file

@ -22,13 +22,6 @@ class ProductTypeSmartSelectModel(BaseSettingsModel):
class ProductNameProfile(BaseSettingsModel):
_layout = "expanded"
# TODO: change to False in next releases
use_legacy_for_renders: bool = SettingsField(
True, title="Use legacy for renders",
description="Use product naming logic for renders. "
"This is for backwards compatibility enabled by default."
"When enabled, it will ignore any templates for renders "
"that are set in the product name profiles.")
product_types: list[str] = SettingsField(
default_factory=list, title="Product types"
@ -73,6 +66,14 @@ class CreatorToolModel(BaseSettingsModel):
title="Create Smart Select"
)
)
# TODO: change to False in next releases
use_legacy_product_names_for_renders: bool = SettingsField(
True, title="Use legacy product names for renders",
description="Use product naming templates for renders. "
"This is for backwards compatibility enabled by default."
"When enabled, it will ignore any templates for renders "
"that are set in the product name profiles.")
product_name_profiles: list[ProductNameProfile] = SettingsField(
default_factory=list,
title="Product name profiles"