I’m working on a publishing plugin for shotgun toolkit and could use some help to figure out a way to make things a little easier for animators to figure out what they’re publishing. For each character in our scene, we may have 1-4 different alembic files that need to be generated - skin, cloth, hair, etc. Currently when I use the toolkit to create items, they each get created as a single item. What I’d like to do is create subtasks under each character for each item that needs to be exported.
Notice in the image on the left, dev_corban:model and dev_corban:model_cloth are both alembic files that need to be published for the character. I can’t quite figure out how to get what I really want which is image on the right… where each alembic file is a task of item corban.
This is a snippet of code that creates the items on the left:
for model in models_to_export: # make a nice name name = model.split(':')[-1] # create the item item = parent_item.create_item( "maya.session.character", "Character", (char_name + ':' + name ) )
I tried the following, but I’m sure I’m missing something:
# create character item item = parent_item.create_item( "maya.session.character", "Character", char_name ) # now define each of the exported models for model in models_to_export: # make a nice name name = model.split(':')[-1] # create the export item export_item = item.create_item( "file.alembic", "Alembic Export", name )
But it doesn’t do anything other than create the top parent_item… I’m sure I’m missing something simple, but any help would be greatly appreciated.