Skip to content

Commit

Permalink
add enabled option
Browse files Browse the repository at this point in the history
  • Loading branch information
moonyuet committed Feb 11, 2025
1 parent 154df90 commit 6b49776
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/ayon_substancedesigner/api/project_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ def create_project_with_from_template(project_settings=None):

resources_dir = sd_app.getPath(SDApplicationPath.DefaultResourcesDir)
project_creation_settings = project_settings["substancedesigner"].get(
"DesignerProjectCreation", {})
"project_creation", {})
if project_creation_settings.get("enabled", False):
return
project_template_settings = project_creation_settings.get(
"project_templates", [])
if not project_creation_settings:
Expand Down
2 changes: 2 additions & 0 deletions server/settings/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class ProjectTemplatesModel(BaseSettingsModel):
)

class ProjectTemplateSettingModel(BaseSettingsModel):
enabled: bool = SettingsField(False, title="Enabled")
project_templates: list[ProjectTemplatesModel] = SettingsField(
default_factory=ProjectTemplatesModel,
title="Project Templates"
Expand Down Expand Up @@ -163,6 +164,7 @@ class SubstanceDesignerSettings(BaseSettingsModel):
DEFAULT_SD_SETTINGS = {
"imageio": DEFAULT_IMAGEIO_SETTINGS,
"project_creation": {
"enabled": False,
"project_templates": []
},
"create_texture": {
Expand Down

0 comments on commit 6b49776

Please sign in to comment.