I am trying to setup a folder structure for a Pipeline Config using the SG schema. I have all of the folders being created just fine until it gets down to creating the Task folders. I would like to have it create folder under the Artwork folder for “concept”, “3d-design”, and “surf-art”. In my Pipeline config I have a folder named sg_task_notation along side the sg_task_notation.yml file in the Artwork folder. Here are the contents of my sg_task_notation.yml file:
# the type of dynamic content
type: shotgun_entity
# the shotgun entity type to connect to
entity_type: Task
# the shotgun field to use for the folder name
name: sg_task_notation
# shotgun filters to apply when getting the list of items
# this should be a list of dicts, each dict containing
# three fields: path, relation and values
# (this is std shotgun API syntax)
# any values starting with $ are resolved into path objects
filters:
- { "path": "sg_task_notation", "relation": "in", "values": [ "concept", "3d-design", "surf-art"] }
Here are the results when trying to create a Character named Fred:
In the scenes folder there is also an sg_task_notation folder and sg_task_notation.yml file. The only difference there is the relation is “not_in” so that it will create all of the remaining task notation folders that are not part of the Artwork pipe.
One thing I have noticed is that you’re not using the Task folder type, that said I’m currently having issues creating a task folder in a step folder (without filters), and I’m not sure what the reason for that is at the moment. Unfortunately I haven’t got time to investigate further right now.
I got it to work by changing the sg_task_notation.yml file content to the following:
# the type of dynamic content
type: "shotgun_task"
# the shotgun field to use for the folder name
name: "sg_task_notation"
# by default, list fields are only created if they are needed by a child entity node
# by setting the create_with_parent parameter to true you ensure that list field
# nodes are always created
create_with_parent: true
# the shotgun entity type to connect to
entity_type: "Task"
# shotgun filters to apply when getting the list of items
# this should be a list of dicts, each dict containing
# three fields: path, relation and values
# (this is std shotgun API syntax)
# any values starting with $ are resolved into path objects
filters:
- { "path": "sg_task_notation", "relation": "in", "values": [ "concept", "3d-design", "surf-art"] }