Fix unnecessary mix nodes for Principled BSDF specular tint
If the specular tint is 0 in a 3.6 file, and the base color has a node input, then don't add a mix node in versioning. Pull Request: https://projects.blender.org/blender/blender/pulls/113893
This commit is contained in:
parent
c71e18054c
commit
37ab9bb1ed
|
@ -849,8 +849,8 @@ static void version_principled_bsdf_specular_tint(bNodeTree *ntree)
|
|||
|
||||
static float one[] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
|
||||
/* If any of the two inputs is dynamic, we add a Mix node. */
|
||||
if (base_color_sock->link || specular_tint_sock->link) {
|
||||
/* Add a mix node when working with dynamic inputs. */
|
||||
if (specular_tint_sock->link || (base_color_sock->link && specular_tint_old != 0)) {
|
||||
bNode *mix = nodeAddStaticNode(nullptr, ntree, SH_NODE_MIX);
|
||||
static_cast<NodeShaderMix *>(mix->storage)->data_type = SOCK_RGBA;
|
||||
mix->locx = node->locx - 170;
|
||||
|
|
Loading…
Reference in New Issue