Hereby I added a request
Iāve added the idea on your behalf, I think it makes sense!
Youāre also able to submit ideas from the roadmap page.
haha thanks Phil!
One more question, how would I launch the specific publisher config from python code inside my DCC?
So instead of pressing the shotgun -> publish -> publisher preset button
What code should I run?
If you run the following it should list the apps available:
import pprint
import sgtk
engine = sgtk.platform.current_engine()
pprint.pprint(engine.commands.keys())
You can then launch them like this:
engine.commands["publish preset name"]['callback']()
Each preset should register under a different name, so itās just a case finding that name and executing that appās callback. I think the name should be the menu name you provided but yourāll need to check.
Edit: I provided the wrong command for printing the keys, it should be engine.commands.keys()
not engine.apps
, Iāve update the example.
Will try!
Question!
Is there a way to wrap my custom collector and plugins into an app that calls the publish app and runs my included collector and plugins?
Basically make such a preset into an app.
Slight bump
Hi @Ricardo_Musch,
To your question, the short answer is not really. You could have a custom app that runs the Publish API, but if you actually want to run the Publish GUI, itās going to run the environment config.
Curious to know why you would like to do it this way. Could you tell us more about your use case?
Hmmā¦
So Iām developing an app that has functionality related to rendering.
I want it to carry a special version of the collector and publish plugins that are specific to this app.
And while publish presets are great, I would rather keep this all inside my app and not have to worry about publish presets being located somewhere else.
@philip.scadding does this work with publishing out of current context?
For example, letās say Iām running the Publish app in a Sequence_Step context, and during the collector, I change the context of some publish items to a Shot_Step context.
It looks like it looks for the publish plugins for the target context, rather than the originating context. Is there a way to point it to the right publish settings block for the target context?
Hey @philip.scadding to add on to my previous comment after doing some investigation. By all accounts, this should work based on the tk-multi-publish2
code. It has some logic in there to select the proper context setting by trying to match the instance name (so as long as youāve named the variants the same in the different contexts, it will work) however thereās a bug thatās preventing this from working.
I checked out the repo for the app, and noticed thereās already a PR for it thatās been languishing for quite a while. Any chance you know someone who can push that fix up the priority list?
Hi all āthanks for pointing out that old PR. I just discussed it with the team, and weāve moved it towards the top of the backlog. Feels like an easy fix, and you all made it clear that weāll get a lot of value from it. Weāll let you know when itās been released!