Cleanup: rename mirror -> mesh_mirror
authorCampbell Barton <ideasman42@gmail.com>
Fri, 22 Nov 2019 02:03:56 +0000 (13:03 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 22 Nov 2019 02:15:04 +0000 (13:15 +1100)
The term mirror on it's own is too ambiguous, use BKE_mesh prefix.

source/blender/blenkernel/BKE_mesh_mirror.h [moved from source/blender/blenkernel/BKE_mirror.h with 57% similarity]
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/mesh_mirror.c [moved from source/blender/blenkernel/intern/mirror.c with 94% similarity]
source/blender/editors/object/object_remesh.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/makesrna/intern/CMakeLists.txt
source/blender/modifiers/intern/MOD_mirror.c

similarity index 57%
rename from source/blender/blenkernel/BKE_mirror.h
rename to source/blender/blenkernel/BKE_mesh_mirror.h
index 20eb8a920fc4448c6313e748bad25b39e60bcf00..306bb84bde113378b47628992660436b6d591e7d 100644 (file)
@@ -30,16 +30,16 @@ struct MirrorModifierData;
 struct ModifierEvalContext;
 struct Object;
 
-struct Mesh *BKE_mirror_bisect_on_mirror_plane(struct MirrorModifierData *mmd,
-                                               const struct Mesh *mesh,
-                                               int axis,
-                                               const float plane_co[3],
-                                               float plane_no[3]);
+struct Mesh *BKE_mesh_mirror_bisect_on_mirror_plane(struct MirrorModifierData *mmd,
+                                                    const struct Mesh *mesh,
+                                                    int axis,
+                                                    const float plane_co[3],
+                                                    float plane_no[3]);
 
-struct Mesh *BKE_mirror_apply_mirror_on_axis(struct MirrorModifierData *mmd,
-                                             const struct ModifierEvalContext *UNUSED(ctx),
-                                             struct Object *ob,
-                                             const struct Mesh *mesh,
-                                             int axis);
+struct Mesh *BKE_mesh_mirror_apply_mirror_on_axis(struct MirrorModifierData *mmd,
+                                                  const struct ModifierEvalContext *UNUSED(ctx),
+                                                  struct Object *ob,
+                                                  const struct Mesh *mesh,
+                                                  int axis);
 
 #endif /* __BKE_MIRROR_H__ */
index 49cead5c003a4bf4df4d17ee7f933087d5d27064..fd8a3db1b638fd585687f72cdd8bd21266a666b7 100644 (file)
@@ -99,6 +99,7 @@ set(SRC
   intern/crazyspace.c
   intern/curve.c
   intern/curve_decimate.c
+  intern/curveprofile.c
   intern/customdata.c
   intern/customdata_file.c
   intern/data_transfer.c
@@ -154,12 +155,12 @@ set(SRC
   intern/mesh_iterators.c
   intern/mesh_mapping.c
   intern/mesh_merge.c
+  intern/mesh_mirror.c
   intern/mesh_remap.c
   intern/mesh_remesh_voxel.c
   intern/mesh_runtime.c
   intern/mesh_tangent.c
   intern/mesh_validate.c
-  intern/mirror.c
   intern/modifier.c
   intern/movieclip.c
   intern/multires.c
@@ -185,7 +186,6 @@ set(SRC
   intern/pbvh_bmesh.c
   intern/pbvh_parallel.cc
   intern/pointcache.c
-  intern/curveprofile.c
   intern/report.c
   intern/rigidbody.c
   intern/scene.c
@@ -266,6 +266,7 @@ set(SRC
   BKE_context.h
   BKE_crazyspace.h
   BKE_curve.h
+  BKE_curveprofile.h
   BKE_customdata.h
   BKE_customdata_file.h
   BKE_data_transfer.h
@@ -311,11 +312,11 @@ set(SRC
   BKE_mesh.h
   BKE_mesh_iterators.h
   BKE_mesh_mapping.h
+  BKE_mesh_mirror.h
   BKE_mesh_remap.h
   BKE_mesh_remesh_voxel.h
   BKE_mesh_runtime.h
   BKE_mesh_tangent.h
-  BKE_mirror.h
   BKE_modifier.h
   BKE_movieclip.h
   BKE_multires.h
@@ -331,7 +332,6 @@ set(SRC
   BKE_particle.h
   BKE_pbvh.h
   BKE_pointcache.h
-  BKE_curveprofile.h
   BKE_report.h
   BKE_rigidbody.h
   BKE_scene.h
similarity index 94%
rename from source/blender/blenkernel/intern/mirror.c
rename to source/blender/blenkernel/intern/mesh_mirror.c
index 02e0a2bb3b987c856fd56c9d16885f6836678bb6..271591d98f000ba3043ac1f4e019eb2b54d76fe0 100644 (file)
@@ -30,7 +30,7 @@
 #include "BKE_library.h"
 #include "BKE_library_query.h"
 #include "BKE_mesh.h"
-#include "BKE_mirror.h"
+#include "BKE_mesh_mirror.h"
 #include "BKE_modifier.h"
 #include "BKE_deform.h"
 
 
 #include "MOD_modifiertypes.h"
 
-Mesh *BKE_mirror_bisect_on_mirror_plane(MirrorModifierData *mmd,
-                                        const Mesh *mesh,
-                                        int axis,
-                                        const float plane_co[3],
-                                        float plane_no[3])
+Mesh *BKE_mesh_mirror_bisect_on_mirror_plane(MirrorModifierData *mmd,
+                                             const Mesh *mesh,
+                                             int axis,
+                                             const float plane_co[3],
+                                             float plane_no[3])
 {
   bool do_bisect_flip_axis = ((axis == 0 && mmd->flag & MOD_MIR_BISECT_FLIP_AXIS_X) ||
                               (axis == 1 && mmd->flag & MOD_MIR_BISECT_FLIP_AXIS_Y) ||
@@ -97,11 +97,11 @@ Mesh *BKE_mirror_bisect_on_mirror_plane(MirrorModifierData *mmd,
   return result;
 }
 
-Mesh *BKE_mirror_apply_mirror_on_axis(MirrorModifierData *mmd,
-                                      const ModifierEvalContext *UNUSED(ctx),
-                                      Object *ob,
-                                      const Mesh *mesh,
-                                      int axis)
+Mesh *BKE_mesh_mirror_apply_mirror_on_axis(MirrorModifierData *mmd,
+                                           const ModifierEvalContext *UNUSED(ctx),
+                                           Object *ob,
+                                           const Mesh *mesh,
+                                           int axis)
 {
   const float tolerance_sq = mmd->tolerance * mmd->tolerance;
   const bool do_vtargetmap = (mmd->flag & MOD_MIR_NO_MERGE) == 0;
@@ -157,7 +157,7 @@ Mesh *BKE_mirror_apply_mirror_on_axis(MirrorModifierData *mmd,
 
   Mesh *mesh_bisect = NULL;
   if (do_bisect) {
-    mesh_bisect = BKE_mirror_bisect_on_mirror_plane(mmd, mesh, axis, plane_co, plane_no);
+    mesh_bisect = BKE_mesh_mirror_bisect_on_mirror_plane(mmd, mesh, axis, plane_co, plane_no);
     mesh = mesh_bisect;
   }
 
index f18b574b582a3187e086252a9f2789f3b2fd47f6..1291891a3a27f30ee4116075d1773d1eee45f98b 100644 (file)
@@ -44,7 +44,7 @@
 #include "BKE_main.h"
 #include "BKE_mesh.h"
 #include "BKE_mesh_runtime.h"
-#include "BKE_mirror.h"
+#include "BKE_mesh_mirror.h"
 #include "BKE_modifier.h"
 #include "BKE_object.h"
 #include "BKE_paint.h"
@@ -328,7 +328,8 @@ static Mesh *remesh_symmetry_bisect(Main *bmain, Mesh *mesh, eSymmetryAxes symme
       zero_v3(plane_no);
       plane_no[axis] = -1.0f;
       mesh_bisect_temp = mesh_bisect;
-      mesh_bisect = BKE_mirror_bisect_on_mirror_plane(&mmd, mesh_bisect, axis, plane_co, plane_no);
+      mesh_bisect = BKE_mesh_mirror_bisect_on_mirror_plane(
+          &mmd, mesh_bisect, axis, plane_co, plane_no);
       if (mesh_bisect_temp != mesh_bisect) {
         BKE_id_free(bmain, mesh_bisect_temp);
       }
@@ -357,7 +358,7 @@ static Mesh *remesh_symmetry_mirror(Object *ob, Mesh *mesh, eSymmetryAxes symmet
       mmd.flag = 0;
       mmd.flag &= MOD_MIR_AXIS_X << i;
       mesh_mirror_temp = mesh_mirror;
-      mesh_mirror = BKE_mirror_apply_mirror_on_axis(&mmd, NULL, ob, mesh_mirror, axis);
+      mesh_mirror = BKE_mesh_mirror_apply_mirror_on_axis(&mmd, NULL, ob, mesh_mirror, axis);
       if (mesh_mirror_temp != mesh_mirror) {
         BKE_id_free(NULL, mesh_mirror_temp);
       }
index 7d63087e255034fca74385fcfbdb9591888a7835..2e98d4639456d43850531b5ca708edfd6f50d19b 100644 (file)
@@ -53,7 +53,7 @@
 #include "BKE_main.h"
 #include "BKE_mesh.h"
 #include "BKE_mesh_mapping.h"
-#include "BKE_mirror.h"
+#include "BKE_mesh_mirror.h"
 #include "BKE_modifier.h"
 #include "BKE_multires.h"
 #include "BKE_node.h"
@@ -8342,7 +8342,7 @@ static int sculpt_symmetrize_exec(bContext *C, wmOperator *UNUSED(op))
           mmd.flag |= MOD_MIR_AXIS_Z | MOD_MIR_BISECT_AXIS_Z;
           break;
       }
-      mesh_mirror = BKE_mirror_apply_mirror_on_axis(&mmd, NULL, ob, mesh, axis);
+      mesh_mirror = BKE_mesh_mirror_apply_mirror_on_axis(&mmd, NULL, ob, mesh, axis);
       if (mesh_mirror) {
         BKE_mesh_nomain_to_mesh(mesh_mirror, mesh, ob, &CD_MASK_MESH, true);
       }
index 7c06582dd6ac66dd02584a930cd80cccf333cb72..42569ec5fa12097ab1855be38b511599a3ee353f 100644 (file)
@@ -40,6 +40,7 @@ set(DEFSRC
   rna_constraint.c
   rna_context.c
   rna_curve.c
+  rna_curveprofile.c
   rna_depsgraph.c
   rna_dynamicpaint.c
   rna_fcurve.c
@@ -68,7 +69,6 @@ set(DEFSRC
   rna_palette.c
   rna_particle.c
   rna_pose.c
-  rna_curveprofile.c
   rna_render.c
   rna_rigidbody.c
   rna_rna.c
index 47f8528ee94281610cc0fce082160917388a53d2..fe3e608fcbee800e27533241042780c8b67a63fe 100644 (file)
@@ -30,7 +30,7 @@
 #include "BKE_library.h"
 #include "BKE_library_query.h"
 #include "BKE_mesh.h"
-#include "BKE_mirror.h"
+#include "BKE_mesh_mirror.h"
 #include "BKE_modifier.h"
 #include "BKE_deform.h"
 
@@ -78,11 +78,11 @@ static Mesh *mirrorModifier__doMirror(MirrorModifierData *mmd,
 
   /* check which axes have been toggled and mirror accordingly */
   if (mmd->flag & MOD_MIR_AXIS_X) {
-    result = BKE_mirror_apply_mirror_on_axis(mmd, ctx, ob, result, 0);
+    result = BKE_mesh_mirror_apply_mirror_on_axis(mmd, ctx, ob, result, 0);
   }
   if (mmd->flag & MOD_MIR_AXIS_Y) {
     Mesh *tmp = result;
-    result = BKE_mirror_apply_mirror_on_axis(mmd, ctx, ob, result, 1);
+    result = BKE_mesh_mirror_apply_mirror_on_axis(mmd, ctx, ob, result, 1);
     if (tmp != mesh) {
       /* free intermediate results */
       BKE_id_free(NULL, tmp);
@@ -90,7 +90,7 @@ static Mesh *mirrorModifier__doMirror(MirrorModifierData *mmd,
   }
   if (mmd->flag & MOD_MIR_AXIS_Z) {
     Mesh *tmp = result;
-    result = BKE_mirror_apply_mirror_on_axis(mmd, ctx, ob, result, 2);
+    result = BKE_mesh_mirror_apply_mirror_on_axis(mmd, ctx, ob, result, 2);
     if (tmp != mesh) {
       /* free intermediate results */
       BKE_id_free(NULL, tmp);