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…
Unfortunately, this functionality was lost when the sub-d settings moved from material to mesh properties. We've added this to our todo list now. The next update will have many additions and fixes to the Python system, and we'll see if we can get this in.
To add to this post, i'd like to inquire about how to change image settings (more specifically, ticking on/off sRGB or Use Mipmaps). This doesn't seem possible using the setfield function nor does it show up when using "getfieldnames", and I've tried using variants of the "sRGB" function in the texture class but can't get…
I got some help from Luxary (author of this script for Marmoset Toolbag), as I noticed their plugin affected the things I wanted to change. To save others the same frustration, I will relay the info I received from them here. Example of setting the Albedo Map to use sRGB, and not use mipmaps.…
thanks @ryanroye for linking me to this thread. I spoke with a tech artist friend and he came up with the exact code you have to set the Albedo map to sRGB: material.albedo.getField("Albedo Map").sRGB = True I ran into the same UI issues. I didn't try save/reloading. But it was not keeping my sRGB checked sometimes. It…
Hey. 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 mat = mset.Material(name) # Delete it mat.destroy() # Assign material to mesh mat.assign(mesh) # Assign texture to material, where texture - path to…