diff options
author | Bastien Montagne <mont29> | 2021-11-12 10:07:07 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-11-25 12:21:49 +0300 |
commit | a0acb9bd0cc049b7b8b941b251c42684b4a0f274 (patch) | |
tree | b9e9b798f744ca6186fcc2388056d4d9267e9db0 /source/blender/blenkernel/BKE_mesh_mirror.h | |
parent | e6cd4761e7c3043c8e9dc789b6eb6d0aa1b723bd (diff) |
Fix T91444: Edge Loop Preview fails with two Mirror Modifiers
The mirror modifiers merge option caused unnecessary re-ordering
to the vertex array with original vertices merging into their copies.
While this wasn't an error, it meant creating a 1:1 mapping from input
vertices to their final output wasn't reliable (when looping over
vertices first to last) as is done in
BKE_editmesh_vert_coords_when_deformed.
As merging in either direction is supported, keep the source meshes
vertices in-order since it allows the vertex coordinates to be extracted.
NOTE: Since this change introduce issues for some cases (e.g. bound
modifiers like SurfaceDeform), this change is only applied to newly
created modifiers, existing ones will still use the old incorrect merge
behavior.
Reviewed By: @brecht
Maniphest Tasks: T93321, T91444
Differential Revision: https://developer.blender.org/D13355
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh_mirror.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh_mirror.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_mesh_mirror.h b/source/blender/blenkernel/BKE_mesh_mirror.h index 7b230b04410..eaa479be867 100644 --- a/source/blender/blenkernel/BKE_mesh_mirror.h +++ b/source/blender/blenkernel/BKE_mesh_mirror.h @@ -43,10 +43,12 @@ void BKE_mesh_mirror_apply_mirror_on_axis(struct Main *bmain, const int axis, const float dist); -struct Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(struct MirrorModifierData *mmd, - struct Object *ob, - const struct Mesh *mesh, - const int axis); +struct Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier( + struct MirrorModifierData *mmd, + struct Object *ob, + const struct Mesh *mesh, + const int axis, + const bool use_correct_order_on_merge); #ifdef __cplusplus } |