diff options
author | Charlie Jolly <mistajolly@gmail.com> | 2022-10-02 02:04:30 +0300 |
---|---|---|
committer | Charlie Jolly <mistajolly@gmail.com> | 2022-10-02 02:04:30 +0300 |
commit | b14ad9114f1d8fb5e1f9a0ef392d49b559a5388e (patch) | |
tree | 0bdcf12179a1af349491171fe72f50816cbd8e34 /source | |
parent | 0fdb9cd6507a28b349abf47122d6dc394ca24dee (diff) |
Fix: Mix node did not set clamp result correctly in versioning code
Files were incorrectly loaded without the Clamp Result option set.
Reported in BA by CarlG
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.cc b/source/blender/blenloader/intern/versioning_300.cc index 2203cf0bc9b..373d68082a6 100644 --- a/source/blender/blenloader/intern/versioning_300.cc +++ b/source/blender/blenloader/intern/versioning_300.cc @@ -1757,7 +1757,7 @@ static void versioning_replace_legacy_mix_rgb_node(bNodeTree *ntree) node->type = SH_NODE_MIX; NodeShaderMix *data = (NodeShaderMix *)MEM_callocN(sizeof(NodeShaderMix), __func__); data->blend_type = node->custom1; - data->clamp_result = node->custom2; + data->clamp_result = (node->custom2 & SHD_MIXRGB_CLAMP) ? 1 : 0; data->clamp_factor = 1; data->data_type = SOCK_RGBA; data->factor_mode = NODE_MIX_MODE_UNIFORM; |