diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-11-22 05:03:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-11-22 05:15:04 +0300 |
commit | 2ecb6645209fe74e58da3bf6f2b5a9af330b8609 (patch) | |
tree | 88851f7d3f39e60b765e17c9b21b8e56eb778d26 /source/blender | |
parent | e3204db7478343aa82d859e544ab0264376e9282 (diff) |
Cleanup: rename mirror -> mesh_mirror
The term mirror on it's own is too ambiguous, use BKE_mesh prefix.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh_mirror.h (renamed from source/blender/blenkernel/BKE_mirror.h) | 20 | ||||
-rw-r--r-- | source/blender/blenkernel/CMakeLists.txt | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_mirror.c (renamed from source/blender/blenkernel/intern/mirror.c) | 24 | ||||
-rw-r--r-- | source/blender/editors/object/object_remesh.c | 7 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_mirror.c | 8 |
7 files changed, 37 insertions, 36 deletions
diff --git a/source/blender/blenkernel/BKE_mirror.h b/source/blender/blenkernel/BKE_mesh_mirror.h index 20eb8a920fc..306bb84bde1 100644 --- a/source/blender/blenkernel/BKE_mirror.h +++ b/source/blender/blenkernel/BKE_mesh_mirror.h @@ -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__ */ diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 49cead5c003..fd8a3db1b63 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -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 diff --git a/source/blender/blenkernel/intern/mirror.c b/source/blender/blenkernel/intern/mesh_mirror.c index 02e0a2bb3b9..271591d98f0 100644 --- a/source/blender/blenkernel/intern/mirror.c +++ b/source/blender/blenkernel/intern/mesh_mirror.c @@ -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" @@ -41,11 +41,11 @@ #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; } diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c index f18b574b582..1291891a3a2 100644 --- a/source/blender/editors/object/object_remesh.c +++ b/source/blender/editors/object/object_remesh.c @@ -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); } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 7d63087e255..2e98d463945 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -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); } diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 7c06582dd6a..42569ec5fa1 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -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 diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 47f8528ee94..fe3e608fcbe 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -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); |