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
This commit is contained in:
Henrik Dick
2020-03-23 15:35:53 +01:00
committed by Bastien Montagne
parent ee4645207f
commit 241248223a

View File

@@ -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) {