Substance 3D painter crashes when Python plugin runs
Copy link to clipboard
Copied
So this is a silly and trivial question but limited documentation left me with no choice. I've created a very basic script that creates a project in substance painter with a given mesh file and then saves it to another location. Like this:
project.create(mesh_file_path=src_file_full_address)
project.execute_when_not_busy(lambda: project.save_as(temp_full_address, project.ProjectSaveMode.Full))
Here, the job "finishes" with no errors. but nothing happens in the project. The file is empty! I tried to check the mesh with: `project.last_imported_mesh_path()`, and substance crashes. The thing is that when I run the exact same 3 lines inside the python console in substance's UI, they work just fine and the mesh file is opened inside the app. So I know it's not because of the syntax or anything. I guess I have to run something before or after running these commands but I have no idea what. Does anyone know anything about this?
Have something to add?

