diff options
author | Henrik Dick <weasel> | 2020-03-23 17:35:53 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-03-23 17:39:48 +0300 |
commit | 241248223a6445a2de77dfd7439ca52c419d28ee (patch) | |
tree | 39e6deb23525e7a0a5b40cb393daae9f36b35ce4 /source/blender/modifiers/intern | |
parent | ee4645207f76a5d76902cec11906ddd3ae815baa (diff) |
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
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify_nonmanifold.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |