Skip to content

Commit b7fd22a

Browse files
committed
Revised Unreal Loader templates to better match Shotgun tk-config-default2
1 parent 58adaf9 commit b7fd22a

File tree

4 files changed

+33
-23
lines changed

4 files changed

+33
-23
lines changed

core/templates.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,23 @@ keys:
121121
default: ma
122122
alias: extension
123123

124-
# These are used by Unreal
125-
sg_category_1:
124+
# These are used by the Loader in Unreal
125+
sg_asset_type_ue4:
126126
type: str
127127
shotgun_entity_type: Asset
128-
shotgun_field_name: sg_category_1
129-
sg_category_2:
128+
shotgun_field_name: sg_asset_type
129+
sg_asset_name:
130130
type: str
131131
shotgun_entity_type: Asset
132-
shotgun_field_name: sg_category_2
133-
sg_category_3:
132+
shotgun_field_name: code
133+
sg_shot_name:
134134
type: str
135-
shotgun_entity_type: Asset
136-
shotgun_field_name: sg_category_3
135+
shotgun_entity_type: Shot
136+
shotgun_field_name: code
137+
sg_sequence_name:
138+
type: str
139+
shotgun_entity_type: Shot
140+
shotgun_field_name: sg_sequence
137141

138142
#
139143
# The paths section contains all the the key locations where files are to be stored
@@ -593,13 +597,12 @@ strings:
593597
# define how new Mari projects should be named
594598
mari_asset_project_name: "{mari.project_name} - Asset {asset_name}, {task_name}"
595599

596-
# base templates for a Shotgun asset to import into the Unreal Content Browser
597-
unreal_asset_template: "/Game/Assets/{sg_asset_type}/{Asset}/"
598-
unreal_asset_notype: "/Game/Assets/{Asset}/"
599-
unreal_published_file: "/Game/PublishedFiles/{Asset}/"
600-
601-
# project-specific templates using categories to classify assets for Unreal import
602-
unreal_fields_query: "{sg_asset_type} {Asset} {sg_category_1} {sg_category_2} {sg_category_3}"
603-
unreal_asset_3_categories: "/Game/Assets/{sg_category_1}/{sg_category_2}/{sg_category_3}/{Asset}/"
604-
unreal_asset_2_categories: "/Game/Assets/{sg_category_1}/{sg_category_2}/{Asset}/"
605-
unreal_asset_1_category: "/Game/Assets/{sg_category_1}/{Asset}/"
600+
# entity-specific templates for importing files into the Unreal content browser
601+
# template logic is defined in Python, not settings:
602+
# tk-unreal/hooks/tk-multi-loader2/tk-unreal_actions.py
603+
unreal_loader_asset_path: "/Game/Assets/{sg_asset_type_ue4}/{sg_asset_name}/"
604+
unreal_loader_asset_name: "{sg_asset_name}_{name}"
605+
unreal_loader_shot_path: "/Game/Cinematics/Sequences/{sg_sequence_name}/{sg_shot_name}/"
606+
unreal_loader_shot_name: "{sg_shot_name}_{name}"
607+
unreal_loader_project_path: "/Game/Assets/"
608+
unreal_loader_project_name: "{name}"

env/includes/engine_locations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@ engines.tk-unreal.location:
8484
type: git_branch
8585
path: [email protected]:shotgunsoftware/tk-unreal
8686
branch: master
87-
version: 1780a1d0156d5227f27d9c85b3ad73b068876ec1
87+
version: 54eeb59a34b3f08a5fd8b0f7d27ab05fa658c35b
8888

env/includes/settings/tk-desktop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ settings.tk-desktop.project:
4747
- "*Motion*"
4848
- "*Nuke*"
4949
- "*Photoshop*"
50+
- "*Unreal*"
5051
name: Creative Tools
5152
- matches:
5253
- "*Hiero*"

env/includes/settings/tk-multi-loader2.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,16 @@ settings.tk-multi-loader2.unreal:
266266
Maya FBX: [import_content]
267267
actions_hook: '{engine}/tk-multi-loader2/tk-unreal_actions.py'
268268
entities:
269-
- caption: Current Project
270-
type: Hierarchy
271-
root: "{context.project}"
272-
publish_filters: []
269+
- caption: Assets
270+
entity_type: Asset
271+
filters:
272+
- [project, is, '{context.project}']
273+
hierarchy: [sg_asset_type, code]
274+
- caption: Shots
275+
entity_type: Shot
276+
filters:
277+
- [project, is, '{context.project}']
278+
hierarchy: [sg_sequence, code]
273279
- caption: My Tasks
274280
type: Query
275281
entity_type: Task

0 commit comments

Comments
 (0)