CoDEmanX / blender-cod

Blender Add-On for Call of Duty® modding
83 stars 26 forks source link

texture_slots was removed from Material API in Blender 2.80 #34

Open BTOdell opened 2 years ago

BTOdell commented 2 years ago

Material#texture_slots has been removed as of Blender 2.80 For some reason, they didn't include the removal in the release notes for 2.80 :(

Anyway, it seems that all of the texture data is now stored in the node trees. https://docs.blender.org/api/2.93/bpy.types.ShaderNodeTexImage.html#bpy.types.ShaderNodeTexImage I think this is the node that manages texture nodes for materials, but they have removed any direct way of determining if the texture is being used for color or for normal maps. So it will involve some clever node tree traversal to determine which textures are being passed to which inputs further along the graph.