Author Topic: Plugin path for installing tools  (Read 227 times)

Reading 2 or 3 of the other posts it seems like there is a lot of confusion with loading a "plugin" that isn't in the default python/plugins folder.

What I am trying to accomplish.

Give the user a simple python "plugin" script, they replace a string with the path to their tools repo and place it in their plugins startup folder so it automatically runs.

This script loads all of the plugins that we store in our tools repo. Basically deploying a suite of tools using a small script that initially loads and sets the plugin path. I've looked at the example using importLib, it logs just tell me it doesnt exist.

Looping thru and printing all module names also prints nothing.

Not sure how this is that difficult.

Code: [Select]
import substance_painter
import substance_painter_plugins

##replace this path with with your tools repo/art/substance path
substance_painter_plugins.path = "D:/MyRepos/Tools/Art/SubstancePainter/plugins"

debug = True
deepDebug = True
print("Debug printing is " + str(debug))
print("Deep Debug printing is " + str(deepDebug))

def start_plugin():
if debug: print("Plugin Loaded")


def close_plugin():
print("closing Plugin")

if __name__ == "__main__":

Not sure if this is happening for anyone else, but once I set the plugins path, reload plugins path and open plugins path options no longer work and substance painter has to be restarted to get the original plugins to show up again.