From 5502517c3c12086c111ae5477fae9c0d2eb8a84c Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Fri, 18 Sep 2020 19:58:48 +0200 Subject: Unify all XYZ symmetry options using Mesh Symmetry This adds XYZ symmetry as a property of meshes and updates all modes to use the mesh symmetry by default to have a consistent tool behavior between all modes and when switching objects. Reviewed By: brecht, mano-wii, campbellbarton Maniphest Tasks: T79785 Differential Revision: https://developer.blender.org/D8587 --- source/blender/makesdna/DNA_mesh_types.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index abfa3cc1b2e..a0baf0ed905 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -221,7 +221,9 @@ typedef struct Mesh { float remesh_voxel_adaptivity; char remesh_mode; - char _pad1[3]; + char symmetry; + + char _pad1[2]; int face_sets_color_seed; /* Stores the initial Face Set to be rendered white. This way the overlay can be enabled by @@ -265,7 +267,7 @@ enum { /* me->editflag */ enum { - ME_EDIT_MIRROR_X = 1 << 0, + ME_EDIT_VERTEX_GROUPS_X_SYMMETRY = 1 << 0, ME_EDIT_MIRROR_Y = 1 << 1, /* unused so far */ ME_EDIT_MIRROR_Z = 1 << 2, /* unused so far */ @@ -320,6 +322,13 @@ enum { ME_SIMPLE_SUBSURF = 1, }; +/* me->symmetry */ +typedef enum eMeshSymmetryType { + ME_SYMMETRY_X = 1 << 0, + ME_SYMMETRY_Y = 1 << 1, + ME_SYMMETRY_Z = 1 << 2, +} eMeshSymmetryType; + #define MESH_MAX_VERTS 2000000000L #ifdef __cplusplus -- cgit v1.2.3