diff options
author | Hans Goudey <h.goudey@me.com> | 2022-02-19 00:17:01 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-02-19 00:17:01 +0300 |
commit | 7f68185d347b01a75836eb7372181a1196f546aa (patch) | |
tree | 935a55de98502bb17fe765bf4db338451333ed22 /source/blender/modifiers | |
parent | d9d97db018d28f4c1ce7543ba275a9809d56294a (diff) | |
parent | 3cebfadb27eb4056d28211708158f9ad8a7459b7 (diff) |
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_displace.c | 3 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify_extrude.c | 6 |
3 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 7d119b4b112..ea42ac761ea 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -371,7 +371,7 @@ static Mesh *arrayModifier_doArray(ArrayModifierData *amd, int tot_doubles; const bool use_merge = (amd->flags & MOD_ARR_MERGE) != 0; - const bool use_recalc_normals = (mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL) || use_merge; + const bool use_recalc_normals = BKE_mesh_vertex_normals_are_dirty(mesh) || use_merge; const bool use_offset_ob = ((amd->offset_type & MOD_ARR_OFF_OBJ) && amd->offset_ob != NULL); int start_cap_nverts = 0, start_cap_nedges = 0, start_cap_npolys = 0, start_cap_nloops = 0; diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index 0411bcd7c34..ddbed4f498e 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -313,8 +313,7 @@ static void displaceModifier_do(DisplaceModifierData *dmd, if (CustomData_has_layer(ldata, CD_CUSTOMLOOPNORMAL)) { float(*clnors)[3] = NULL; - if ((mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL) || - !CustomData_has_layer(ldata, CD_NORMAL)) { + if (!CustomData_has_layer(ldata, CD_NORMAL)) { BKE_mesh_calc_normals_split(mesh); } diff --git a/source/blender/modifiers/intern/MOD_solidify_extrude.c b/source/blender/modifiers/intern/MOD_solidify_extrude.c index 0313c37283a..fdaf7bd41d1 100644 --- a/source/blender/modifiers/intern/MOD_solidify_extrude.c +++ b/source/blender/modifiers/intern/MOD_solidify_extrude.c @@ -953,7 +953,7 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex } /* must recalculate normals with vgroups since they can displace unevenly T26888. */ - if ((mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL) || do_rim || dvert) { + if (BKE_mesh_vertex_normals_are_dirty(mesh) || do_rim || dvert) { BKE_mesh_normals_tag_dirty(result); } else if (do_shell) { @@ -1009,9 +1009,9 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex #define SOLIDIFY_SIDE_NORMALS #ifdef SOLIDIFY_SIDE_NORMALS - /* NOTE(@sybren): due to the code setting cd_dirty_vert a few lines above, + /* NOTE(@sybren): due to the code setting normals dirty a few lines above, * do_side_normals is always false. */ - const bool do_side_normals = !(result->runtime.cd_dirty_vert & CD_MASK_NORMAL); + const bool do_side_normals = !BKE_mesh_vertex_normals_are_dirty(result); /* annoying to allocate these since we only need the edge verts, */ float(*edge_vert_nos)[3] = do_side_normals ? MEM_calloc_arrayN(numVerts, sizeof(float[3]), __func__) : |