Recently, I had the chance to test the new Python API update. It is definitely an upgrade — and a big one!
The first thing I noticed is that most of the classes and methods are still the same, so a lot of the existing code will remain valid.
But the biggest improvement is how the plugin manager now works: the plugins can finally remain persistent, which means that they are no longer attached to a specific graph or window and can fully interact as a native part of Substance Designer. Also, with the integration of Qt, making a multi-platform user interface is possible (bye-bye Tkinter! :D).
In order to test how well the plugins could be integrated with Substance Designer and how far I would be able to extend its functionality, I searched through the user-voice requests, social network comments, forums, Discord, and more. I found two plugin opportunities to showcase the new API improvements: – Add a shortcut manager for Substance Designer – Add a way to modify multiple nodes simultaneously
The final objectives were to create a relatively simple solution that users with some Python knowledge could implement on their own, and to show how easy it is to improve and speed up your workflow with some coding effort.
The Shortcut Manager (get it on Substance Share) allows the user to set shortcuts for some predefined tasks: export the selected nodes to a default path, add frames with random colors, add comments and set a random value to the seeds of the selected nodes.
Also, and this is one of my favorites, you can easily add a shortcut to any node you want and even configure the properties of this node! So, if you always wanted to add by default the Transformation 2D node with an absolute inheritance and no tiling, or the Tile Generator with an input image pattern by default, it is now possible.
With the Multi Node Editor (get it on Substance Share), you can modify common properties of two or more nodes at the same time, including inheritance when it is valid.
It is ideal for quick iterations and to update nodes in scenarios in which you don’t necessarily want to bind properties with functions.
Both plugins were made with a similar structure, and all the UI was made with Qt and a dockable window, which makes it fit seamlessly within the rest of the Substance Designer user interface.
Development was fully made with Python and some default configurations saved in a .json file inside the plugin folder. If you are interested by these plugins, you’ll be able to find the source code in Substance Share.
This new update adds the possibility of creating custom UIs for the plugins you are developing, and it’s working great!
As you can see with the plugin examples I created, you can definitely find ways to improve the user experience and speed up your workflow.
Keep in mind that there are still some limitations, like accessing the 3D view or being able to use the native user controls via Qt, but with each new release, we are getting closer and closer to being able to tune up Substance Designer to our liking.
These updates have added to the current ability for pipeline integrations such as connecting with other software, managing libraries, publishing materials, and so on. It is more than ready to be used!
The new scripting capabilities in Substance Designer are part of the latest release. Check out the release post here, and don’t forget to upgrade your version of Substance Designer! And if you want a simpler way to update your Substance tools and browse content, check out the Launcher – it’s free!