Skip to content

Commit

Permalink
Revert schema for old build workfile compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitConnan authored and ClementHector committed Feb 8, 2022
1 parent 59f25d7 commit e82ff2c
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 10 deletions.
3 changes: 2 additions & 1 deletion openpype/lib/abstract_load_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def template_path(self):
project_settings = get_project_settings(project)
current_dcc = avalon.io.Session["AVALON_APP"]
current_task = avalon.io.Session["AVALON_TASK"]
profiles = project_settings[current_dcc]['workfile_build']['profiles']
build_info = project_settings[current_dcc]['templated_workfile_build']
profiles = build_info['profiles']

for profile in profiles:
if current_task in profile['task_types']:
Expand Down
92 changes: 91 additions & 1 deletion openpype/settings/defaults/project_settings/maya.json
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,97 @@
"profiles": [
{
"task_types": [],
"path": "C:\\path\\to\\template"
"tasks": [
"Lighting"
],
"current_context": [
{
"subset_name_filters": [
"\".+[Mm]ain\""
],
"families": [
"model"
],
"repre_names": [
"abc",
"ma"
],
"loaders": [
"ReferenceLoader"
]
},
{
"subset_name_filters": [],
"families": [
"animation",
"pointcache"
],
"repre_names": [
"abc"
],
"loaders": [
"ReferenceLoader"
]
},
{
"subset_name_filters": [],
"families": [
"rendersetup"
],
"repre_names": [
"json"
],
"loaders": [
"RenderSetupLoader"
]
},
{
"subset_name_filters": [],
"families": [
"camera"
],
"repre_names": [
"abc"
],
"loaders": [
"ReferenceLoader"
]
}
],
"linked_assets": [
{
"subset_name_filters": [],
"families": [
"sedress"
],
"repre_names": [
"ma"
],
"loaders": [
"ReferenceLoader"
]
},
{
"subset_name_filters": [],
"families": [
"ArnoldStandin"
],
"repre_names": [
"ass"
],
"loaders": [
"assLoader"
]
}
]
}
]
},
"templated_workfile_build": {
"profiles": [
{
"task_types": [],
"path": "path\\to\\template"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"label": "Extension Mapping",
"use_label_wrap": true,
"object_type": {
"type": "text"
}
"type": "text"
}
},
{
"type": "dict",
"type": "dict",
"collapsible": true,
"checkbox_key": "enabled",
"key": "maya-dirmap",
Expand Down Expand Up @@ -67,9 +67,13 @@
"type": "schema",
"name": "schema_workfile_build"
},
{
"type": "schema",
"name": "schema_templated_workfile_build"
},
{
"type": "schema",
"name": "schema_publish_gui_filter"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"type": "dict",
"collapsible": true,
"key": "templated_workfile_build",
"label": "Templated Workfile Build Settings",
"children": [
{
"type": "list",
"key": "profiles",
"label": "Profiles",
"object_type": {
"type": "dict",
"children": [
{
"key": "task_types",
"label": "Task types",
"type": "task-types-enum"
},
{
"key": "path",
"label": "Path to template",
"type": "text"
}
]
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,86 @@
"type": "task-types-enum"
},
{
"key": "path",
"label": "Path to template",
"type": "text"
"key": "tasks",
"label": "Task names",
"type": "list",
"object_type": "text"
},
{
"type": "splitter"
},
{
"key": "current_context",
"label": "<b>Current Context</b>",
"type": "list",
"highlight_content": true,
"object_type": {
"type": "dict",
"children": [
{
"key": "subset_name_filters",
"label": "Subset name Filters",
"type": "list",
"object_type": "text"
},
{
"key": "families",
"label": "Families",
"type": "list",
"object_type": "text"
},
{
"key": "repre_names",
"label": "Repre Names",
"type": "list",
"object_type": "text"
},
{
"key": "loaders",
"label": "Loaders",
"type": "list",
"object_type": "text"
}
]
}
},
{
"key": "linked_assets",
"label": "<b>Linked Assets</b>",
"type": "list",
"highlight_content": true,
"object_type": {
"type": "dict",
"children": [
{
"key": "subset_name_filters",
"label": "Subset name Filters",
"type": "list",
"object_type": "text"
},
{
"key": "families",
"label": "Families",
"type": "list",
"object_type": "text"
},
{
"key": "repre_names",
"label": "Repre Names",
"type": "list",
"object_type": "text"
},
{
"key": "loaders",
"label": "Loaders",
"type": "list",
"object_type": "text"
}
]
}
}
]
}
}
]
}
}

0 comments on commit e82ff2c

Please sign in to comment.