Hey there!
I am tasked with writing a python script for automated object baking.
I am stuck after importing the model. Only the albedo map is assigned to the material.
Maps like metallic, normal and roughness are not assigned.
It would be no problem for me to assign those texures in the python script but i haven't found any functionality exposed that would allow me to do that.
So i am stuck with the import functionality that does not import all my maps.
Do you have any suggestions to this problem?
Greetings,
Mamu
Replies
There are two examples in plugin folder that can help you with materials scripting:
Creating Materials from Images.py
Editing Materials.py
Shortly:
# Create new material
# Delete it
# Assign material to mesh
# Assign texture to material, where texture - path to file
Example of setting the Albedo Map to use sRGB, and not use mipmaps.
I guess I was thrown off by the idea of "get" meaning to obtain information rather than set parameters.
NOTE: As of Marmoset Toolbag 3.08, you will not see the checkbox update in the UI until you save and reload the scene. As far as I know, this is only a cosmetic issue, it still works as intended.