Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion client/ayon_maya/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from ayon_maya import MAYA_ROOT_DIR
from ayon_maya.lib import create_workspace_mel

from . import menu, lib
from . import menu, lib, workfile_template_builder
from .workio import (
open_file,
save_file,
Expand Down Expand Up @@ -661,6 +661,8 @@ def on_new():
with lib.suspended_refresh():
lib.set_context_settings()

workfile_template_builder.build_workfile_template(
workfile_creation_enabled=True)
Comment thread
BigRoy marked this conversation as resolved.
Outdated
_remove_workfile_lock()


Expand Down
4 changes: 2 additions & 2 deletions client/ayon_maya/api/workfile_template_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ def read(self, node):
return data


def build_workfile_template(*args):
def build_workfile_template(*args, **kwargs):
builder = MayaTemplateBuilder(registered_host())
builder.build_template()
builder.build_template(*args, **kwargs)


def update_workfile_template(*args):
Expand Down
7 changes: 7 additions & 0 deletions server/settings/templated_workfile_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ class WorkfileBuildProfilesModel(BaseSettingsModel):
default_factory=list, title="Task names"
)
path: str = SettingsField("", title="Path to template")
keep_placeholder: bool = SettingsField(
False,
title="Keep placeholders")
create_first_version: bool = SettingsField(
True,
title="Create first version"
)


class TemplatedProfilesModel(BaseSettingsModel):
Expand Down
Loading