Sometimes it can be desirable to have different types of Publish presets that your users can choose between.
For example, there maybe situations where you want your users to only output a scene file, and other occasions when you want them to publish a playblast or a material. By default you have one settings block for tk-multi-publish2
in a given environment that collects all of these things and then the user could untick the ones they don’t want:
However, to avoid mistakes and to make it clear for your user’s what you want them to publish for a given type, you could have multiple tk-multi-publish2
settings registered in the same environment so that you have multiple launch actions for the type of publish you want to do:
(Note Shotgun doesn’t provide a publish plugin for publishing materials, this example is purely to illustrate how you could have separate settings/presets/actions for different types of publishes)
You can achieve this by duplicating up your publish settings, and setting a different display_name
value for each settings block, that will be used as the action menu name for the publish app.
In the env/includes/settings/tk-maya.yml
you would add the app for each settings block:
settings.tk-maya.asset_step:
apps:
tk-multi-publish2-scene: "@settings.tk-multi-publish2.maya.asset_step.scene"
tk-multi-publish2-playblast: "@settings.tk-multi-publish2.maya.asset_step.playblast"
tk-multi-publish2-alembic: "@settings.tk-multi-publish2.maya.asset_step.alembic"
tk-multi-publish2-materials: "@settings.tk-multi-publish2.maya.asset_step.materials"
...
and then in the env/includes/settings/tk-multi-publish2.yml
you would have:
settings.tk-multi-publish2.maya.asset_step.scene:
display_name: "Publish Scene"
collector: "{self}/collector.py:{engine}/tk-multi-publish2/basic/collector.py:{config}/tk-multi-publish2/collector.py"
collector_settings:
Work Template: maya_asset_work
publish_plugins:
- name: Publish to Shotgun
hook: "{self}/publish_file.py"
settings: {}
...
settings.tk-multi-publish2.maya.asset_step.playblast:
display_name: "Publish Playblasts"
...
settings.tk-multi-publish2.maya.asset_step.alembic:
display_name: "Publish Alembic"
...
settings.tk-multi-publish2.maya.asset_step.materials:
display_name: "Publish Materials"
...
Where each settings block only contained the required plugins for that type of publish.