Reloading a resource material
Hello,
I am trying to reload a material via the python API, and got an error I don't quite understand. For context the material is applied to a texture set in the scene, and it is a sbsar.
I am using the url of the applied material to get the old ID, import the new material to get the new resource, and then call
substance_painter.resource.update_layer_stack_resource(old_resource_id, resource)However, in the python console, it reads out a RuntimeError:
RuntimeError: Unable to update Resource. Resource type not supported. Only images, particles and substances are supported.
In the API docs, some limitations are called out:
The new resource must be of the same type as the resources it replaces. For example a base material resource cannot be updated with a smart material resource.
Moreover:
If the resource is a Substance material, it must have the same number and names of outputs.
If the resource is a Substance filter, it must have the same number and names of inputs and outputs.
But to test my code, I have not changed anything about the material to make sure what is being called out couldn't be what is happening.
Long story short, are SBSAR materials not able to reload?
Thank you for any insights.
