Author Topic: about distributing plugins  (Read 724 times)

Hey,

So i'm in the process of creating a plugin for painter that automatically sets up texture metadata and materials in our project when exporting textures. Right now this is done by generating said metadata files on onExportFinished if the user used any of our specific export templates.

This seems to work fine for the most part but when it comes to distributing this plugin and it's related export templates within the company using our version control system i run into some issues.

Specifically i would like to know if:

1: Is there a way to distribute export configurations together with a plugin ?
2: Is there a way to load plugins from other folders than the user/documents.... plugin folder?

Ideally i would like to distribute the plugin with a specific shelf that users mount thus allowing me to distribute export configurations with the same shelf. Alternatively being able to specify a custom plugin folder and being able to load export configuration also from the plugin folder somehow.

Cheers

Regarding item 1.. this is typically part of a shelf deployment since they shelf resources. You could probably have a plugin install those preset resources into a shelf on init as long as you know what shelf they need to be put in. Deploying them with your project shelves is likely a better approach though for consistent asset interface and compatibility.

That said, I'm personally not a fan of the application template and export presets for large productions. They have little to no API visibility and must be manually maintained, which generally means they don't get maintained, and require a shelf re-deployment. If you have custom scene assemblers and exporters, your own JSON config might be an option to consider.

Regarding item 2.. Your plugins don't have to reside in the user docs directory. If you are controlling the user environment, you can add a custom plugins path via SUBSTANCE_PAINTER_PLUGINS_PATH. Keep in mind, the folder structure should match the expected user docs structure.

I just realized that my response to item 2 assumes you are using the python API. It's been a while since I've written JS plugins, but I remember that being more complicated, and I don't think I ever successfully extended the QT import paths