No {self}
will only look in the local folder for the app, engine or framework. So in this case, as the hook is for the tk-multi-publish2
app, it will look within that app’s bundle. It won’t also check the engine.
You can read more about what those tokens do here (you need to scroll down a short way).
You can introduce inheritance using :
which is also discussed in these two posts:
Inheritance would allow you to have that fallback behavior so that if a method wasn’t defined in the engine hook, it could look in the app’s hook, (normal python inheritance behavior.)
That’s a really good question and I can see why it looks like it is the same thing loading twice but, despite the name, they are being treated as two separate plugins. The key is to look at what collected items they act on.
{self}/upload_version.py
- This is the upload_version plugin that comes with the publish2 app, so it is not specific to any engine in particular. It is designed to handle specifically "file.image"
and "file.video"
collected items.
{engine}/tk-multi-publish2/basic/upload_version.py
- This plugin comes from the tk-photoshopcc
engine and as such can be written in a way that is specific to Photoshop. It responds to "photoshop.document"
type collected items.
So by having both of these plugins registered as separate plugins rather than inheriting from each other, they are able to handle different collected items separately.