startup.py not working
When trying to use Python to build a Project file I can execute these two lines in the script panel, everything works fine. However, when I put this code into a startup.py in the startup folder of SUBSTANCE_PAINTER_PLUGINS_PATH, it does not work.
import substance_painter.project
substance_painter.project.create(mesh_file_path="D:/Temp/box_low.fbx")
The fbx file is a simple cube. But, this does not work wuth any fbx file I use. Here is the full startup.py code:
import substance_painter.logging
import substance_painter.project
def start_plugin():
"""This method is called when the plugin is started."""
logger = substance_painter.logging.info
logger("Substance Painter started")
substance_painter.project.create(mesh_file_path="D:/Temp/box_low.fbx")
def close_plugin():
"""This method is called when the plugin is stopped."""
pass
if __name__ == "__main__":
start_plugin()
Upon startup I get the logger message, but nothing else.
