Fix: MaterialX of gradient texture node is wrong

Node input names changes in MaterialX 1.39.

Pull Request: https://projects.blender.org/blender/blender/pulls/134411
This commit is contained in:
Brecht Van Lommel
2025-02-11 17:16:54 +01:00
parent 77a7c68c9d
commit 21da1aec16

View File

@@ -1101,7 +1101,15 @@ NodeItem NodeItem::arithmetic(const NodeItem &other,
}
}
else {
res = create_node(category, to_type, {{"in1", item1}, {"in2", item2}});
#if !(MATERIALX_MAJOR_VERSION <= 1 && MATERIALX_MINOR_VERSION <= 38)
if (category == "atan2") {
res = create_node(category, to_type, {{"iny", item1}, {"inx", item2}});
}
else
#endif
{
res = create_node(category, to_type, {{"in1", item1}, {"in2", item2}});
}
}
return res;
}