From 241248223a6445a2de77dfd7439ca52c419d28ee Mon Sep 17 00:00:00 2001 From: Henrik Dick Date: Mon, 23 Mar 2020 15:35:53 +0100 Subject: [PATCH] Change solidify's material offset in complex mode to conform with simple mode this patch will change the behaviour of the material offset in complex mode to fit simple mode output. Previously in complex mode this would offset the material of the enire shell, because when you read the tooltip it says material for new generated geometry. In complex mode everything is new generated geometry though. In simple mode on the other hand, this would give you a way to only change the inside faces material. There may be cases in large modifier stacks where material offset like it is implemented currently in complex mode may be useful, but it is much more useful in the way it is implemented by simple mode. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D7215 --- source/blender/modifiers/intern/MOD_solidify_nonmanifold.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c index 3cd045b73ae..9c99f9b1e88 100644 --- a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c +++ b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c @@ -2212,7 +2212,7 @@ Mesh *MOD_solidify_nonmanifold_applyModifier(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 + mat_ofs; + mpoly[poly_index].mat_nr = fr->face->mat_nr + (fr->reversed ? 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) {