[Bf-blender-cvs] [1454865ebb9] master: Fix T80269: Match material offset in solidify modes

Henrik Dick noreply at git.blender.org
Mon Oct 5 14:58:21 CEST 2020


Commit: 1454865ebb996bdcd9007abb440772335a285a36
Author: Henrik Dick
Date:   Thu Oct 1 23:54:04 2020 +0200
Branches: master
https://developer.blender.org/rB1454865ebb996bdcd9007abb440772335a285a36

Fix T80269: Match material offset in solidify modes

This commit to complex solidify swaps the side of the geometry which
is affected by the material offset when the normal flip option is
enabled. This matches simple solidify and is considered correct/useful.

Ref D8948

===================================================================

M	source/blender/modifiers/intern/MOD_solidify_nonmanifold.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c
index 1e0269617ec..6dd04745d07 100644
--- a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c
+++ b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c
@@ -2391,7 +2391,7 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
           CustomData_copy_data(&mesh->pdata, &result->pdata, (int)(i / 2), (int)poly_index, 1);
           mpoly[poly_index].loopstart = (int)loop_index;
           mpoly[poly_index].totloop = (int)k;
-          mpoly[poly_index].mat_nr = fr->face->mat_nr + (fr->reversed ? mat_ofs : 0);
+          mpoly[poly_index].mat_nr = fr->face->mat_nr + (fr->reversed != do_flip ? mat_ofs : 0);
           CLAMP(mpoly[poly_index].mat_nr, 0, mat_nr_max);
           mpoly[poly_index].flag = fr->face->flag;
           if (fr->reversed != do_flip) {



More information about the Bf-blender-cvs mailing list