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
This commit is contained in:
Charlie Jolly 2022-10-02 00:04:30 +01:00
parent 0fdb9cd650
commit b14ad9114f
Notes: blender-bot 2023-02-14 07:53:51 +01:00
Referenced by issue #101537, Regression: Crash render Cycles & Volume + Sky Texture on world shader
1 changed files with 1 additions and 1 deletions

View File

@ -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;