Publish Session
Back in the tk-multi-publish.yml file we added a line to look for the publish_session_hdas script during the publish process. This script is just a copy of the publish_process script and renamed. Inside the script I have also renamed every instance of the class name HoudiniSessionPublishPlugin to HoudiniSessionHDAPublishPlugin
To start, we need to specific what publish item this script is looking for to process. This is done with the item_filters method.
@property
def item_filters(self):
"""
List of item types that this plugin is interested in.
Only items matching entries in this list will be presented to the
accept() method. Strings can contain glob patters such as *, for example
["maya.*", "file.maya"]
"""
return ["houdini.session.hda.hdaitem"]
If you stopped here you should see your collected digital assets in Shotgun’s publish window as items with a check mark beside them.
Templates
Taking a side step for a second I wanted to mention the templates.yml file. This file is located in the config–>core directory. Here is where you can define how and where your hda file will be saved. In mine I have set it up like the following:
# HDAs - Houdini Digital Assets
houdini_asset_publish_hda:
definition: '@asset_root/publish/houdini/otls/{Asset}_{Step}_{task_name}_v{version}.hda'
root_name: primary
The publishing process will look to this definition for naming. By default Shotgun doesn’t provide the task_name. I had to go through a couple of hoops to provide this value. For the simplicity of this example we can hard code this value for now. I can explain how to change this later perhaps.
I hope all this is making sense. Before I continue I’d like to know if this is helping. Are you getting the results I hope you are getting?