Maniphest T80133

Material base color default values are incorrect
Closed, Archived

Assigned To
None
Authored By
Domenic Jahn (Kruspe)
Aug 26 2020, 12:40 PM
Tags
  • BF Blender
Subscribers
Domenic Jahn (Kruspe)

Description

System Information
Operating system: Windows 10, Debian 10
Graphics card: Multiple

Blender Version
Broken: 2.91.0 alpha (#e414afbaf668550844451b1ca0c4c30541f9827d)
Worked: 2.81a

Short description of error
When iterating over materials and retrieving their default base color value, Blender returns false values.

Exact steps for others to reproduce the error

import bpy
for mat in bpy.data.materials:
    mat.use_nodes = True
    principled = next(n for n in mat.node_tree.nodes if n.type == 'BSDF_PRINCIPLED')
    base_color = principled.inputs['Base Color']
    value = base_color.default_value
    print(mat.name + ", " + str(value[0]) + ", " + str(value[1]) + ", " + str(value[2]) + "\n\n")

Blender 2.91.0 alpha prints the same value as r, g and b value - for every material. Example: 0.800000011920929, 0.800000011920929, 0.800000011920929

Blender 2.81a prints the correct values that differ from material to material. Example: 0.7465499639511108, 0.3384695053100586, 0.09304799139499664

Event Timeline

Domenic Jahn (Kruspe) created this task.Aug 26 2020, 12:40 PM
Domenic Jahn (Kruspe) updated the task description.
Domenic Jahn (Kruspe) updated the task description.
Domenic Jahn (Kruspe) added a comment.Aug 26 2020, 1:05 PM

It seems that use_nodes=True clears base_color attribute of imported meshes. This might be another issue.

Domenic Jahn (Kruspe) closed this task as Archived.Aug 26 2020, 1:05 PM