diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_cycles.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_cycles.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_cycles.c b/source/blender/blenloader/intern/versioning_cycles.c index 26329fca6fa..7b5cb8ed757 100644 --- a/source/blender/blenloader/intern/versioning_cycles.c +++ b/source/blender/blenloader/intern/versioning_cycles.c @@ -1197,7 +1197,7 @@ static void update_voronoi_node_square_distance(bNodeTree *ntree) NodeTexVoronoi *tex = (NodeTexVoronoi *)node->storage; bNodeSocket *sockDistance = nodeFindSocket(node, SOCK_OUT, "Distance"); if (tex->distance == SHD_VORONOI_EUCLIDEAN && - (tex->feature == SHD_VORONOI_F1 || tex->feature == SHD_VORONOI_F2) && + (ELEM(tex->feature, SHD_VORONOI_F1, SHD_VORONOI_F2)) && socket_is_used(sockDistance)) { bNode *multiplyNode = nodeAddStaticNode(NULL, ntree, SH_NODE_MATH); multiplyNode->custom1 = NODE_MATH_MULTIPLY; @@ -1237,7 +1237,7 @@ static void update_noise_and_wave_distortion(bNodeTree *ntree) bool need_update = false; LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { - if (node->type == SH_NODE_TEX_NOISE || node->type == SH_NODE_TEX_WAVE) { + if (ELEM(node->type, SH_NODE_TEX_NOISE, SH_NODE_TEX_WAVE)) { bNodeSocket *sockDistortion = nodeFindSocket(node, SOCK_IN, "Distortion"); float *distortion = cycles_node_socket_float_value(sockDistortion); |