diff options
Diffstat (limited to 'source/blender')
27 files changed, 84 insertions, 25 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index d08cd5eff3f..46c6f68384e 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -667,31 +667,6 @@ void BKE_mesh_calc_edges_loose(struct Mesh *mesh); void BKE_mesh_calc_edges(struct Mesh *mesh, bool update, const bool select); void BKE_mesh_calc_edges_tessface(struct Mesh *mesh); -/* *** mesh_geomtype.c *** */ -struct Mesh *BKE_mesh_wrapper_from_editmesh_with_coords( - struct BMEditMesh *em, - const struct CustomData_MeshMasks *cd_mask_extra, - float (*vertexCos)[3], - const struct Mesh *me_settings); -struct Mesh *BKE_mesh_wrapper_from_editmesh(struct BMEditMesh *em, - const struct CustomData_MeshMasks *cd_mask_extra, - const struct Mesh *me_settings); -void BKE_mesh_wrapper_ensure_mdata(struct Mesh *me); -bool BKE_mesh_wrapper_minmax(const struct Mesh *me, float min[3], float max[3]); - -int BKE_mesh_wrapper_vert_len(const struct Mesh *me); -int BKE_mesh_wrapper_edge_len(const struct Mesh *me); -int BKE_mesh_wrapper_loop_len(const struct Mesh *me); -int BKE_mesh_wrapper_poly_len(const struct Mesh *me); - -void BKE_mesh_wrapper_vert_coords_copy(const struct Mesh *me, - float (*vert_coords)[3], - int vert_coords_len); -void BKE_mesh_wrapper_vert_coords_copy_with_mat4(const struct Mesh *me, - float (*vert_coords)[3], - int vert_coords_len, - const float mat[4][4]); - /* In DerivedMesh.c */ void BKE_mesh_wrapper_deferred_finalize(struct Mesh *me_eval, const CustomData_MeshMasks *final_datamask); diff --git a/source/blender/blenkernel/BKE_mesh_wrapper.h b/source/blender/blenkernel/BKE_mesh_wrapper.h new file mode 100644 index 00000000000..ec6a1e3457c --- /dev/null +++ b/source/blender/blenkernel/BKE_mesh_wrapper.h @@ -0,0 +1,59 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +#ifndef __BKE_MESH_WRAPPER_H__ +#define __BKE_MESH_WRAPPER_H__ + +/** \file + * \ingroup bke + */ + +struct BMEditMesh; +struct CustomData_MeshMasks; +struct Mesh; + +#ifdef __cplusplus +extern "C" { +#endif + +struct Mesh *BKE_mesh_wrapper_from_editmesh_with_coords( + struct BMEditMesh *em, + const struct CustomData_MeshMasks *cd_mask_extra, + float (*vertexCos)[3], + const struct Mesh *me_settings); +struct Mesh *BKE_mesh_wrapper_from_editmesh(struct BMEditMesh *em, + const struct CustomData_MeshMasks *cd_mask_extra, + const struct Mesh *me_settings); +void BKE_mesh_wrapper_ensure_mdata(struct Mesh *me); +bool BKE_mesh_wrapper_minmax(const struct Mesh *me, float min[3], float max[3]); + +int BKE_mesh_wrapper_vert_len(const struct Mesh *me); +int BKE_mesh_wrapper_edge_len(const struct Mesh *me); +int BKE_mesh_wrapper_loop_len(const struct Mesh *me); +int BKE_mesh_wrapper_poly_len(const struct Mesh *me); + +void BKE_mesh_wrapper_vert_coords_copy(const struct Mesh *me, + float (*vert_coords)[3], + int vert_coords_len); +void BKE_mesh_wrapper_vert_coords_copy_with_mat4(const struct Mesh *me, + float (*vert_coords)[3], + int vert_coords_len, + const float mat[4][4]); + +#ifdef __cplusplus +} +#endif + +#endif /* __BKE_MESH_WRAPPER_H__ */ diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 89712a1aed2..c1a548360af 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -347,6 +347,7 @@ set(SRC BKE_mesh_remesh_voxel.h BKE_mesh_runtime.h BKE_mesh_tangent.h + BKE_mesh_wrapper.h BKE_modifier.h BKE_movieclip.h BKE_multires.h diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 8f820a873fe..b4e2cd772c9 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -57,6 +57,7 @@ #include "BKE_mesh_mapping.h" #include "BKE_mesh_runtime.h" #include "BKE_mesh_tangent.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_multires.h" #include "BKE_object.h" diff --git a/source/blender/blenkernel/intern/crazyspace.c b/source/blender/blenkernel/intern/crazyspace.c index 6c8438e478e..4d685a511fd 100644 --- a/source/blender/blenkernel/intern/crazyspace.c +++ b/source/blender/blenkernel/intern/crazyspace.c @@ -38,6 +38,7 @@ #include "BKE_editmesh.h" #include "BKE_lib_id.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_multires.h" diff --git a/source/blender/blenkernel/intern/editmesh.c b/source/blender/blenkernel/intern/editmesh.c index c4160d6d253..3d5f9cad1c1 100644 --- a/source/blender/blenkernel/intern/editmesh.c +++ b/source/blender/blenkernel/intern/editmesh.c @@ -36,6 +36,7 @@ #include "BKE_lib_id.h" #include "BKE_mesh.h" #include "BKE_mesh_iterators.h" +#include "BKE_mesh_wrapper.h" #include "BKE_object.h" BMEditMesh *BKE_editmesh_create(BMesh *bm, const bool do_tessellate) diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 0d20d25f84c..48baedadd73 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -53,6 +53,7 @@ #include "BKE_material.h" #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_multires.h" #include "BKE_object.h" diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c index f2c84028570..9e5565d744a 100644 --- a/source/blender/blenkernel/intern/mesh_convert.c +++ b/source/blender/blenkernel/intern/mesh_convert.c @@ -47,6 +47,7 @@ #include "BKE_mball.h" #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" /* these 2 are only used by conversion functions */ #include "BKE_curve.h" diff --git a/source/blender/blenkernel/intern/mesh_wrapper.c b/source/blender/blenkernel/intern/mesh_wrapper.c index 7f4f6b98700..4cd4e549214 100644 --- a/source/blender/blenkernel/intern/mesh_wrapper.c +++ b/source/blender/blenkernel/intern/mesh_wrapper.c @@ -63,6 +63,7 @@ #include "BKE_material.h" #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_multires.h" #include "BKE_object.h" diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 324a9d3ccb0..d4b7d05c228 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -57,6 +57,7 @@ #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_multires.h" #include "BKE_object.h" diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index e7a8d04e0b8..4505f9e8d57 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -108,6 +108,7 @@ #include "BKE_material.h" #include "BKE_mball.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_multires.h" #include "BKE_node.h" diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c index 84651f79e8a..ad8d6ac8b8a 100644 --- a/source/blender/modifiers/intern/MOD_armature.c +++ b/source/blender/modifiers/intern/MOD_armature.c @@ -40,6 +40,7 @@ #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index 2f475e9fca6..e2653701970 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -38,6 +38,7 @@ #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c index 3d9f59fba24..f277e8bc12c 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.c +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c @@ -42,6 +42,7 @@ #include "BKE_editmesh.h" #include "BKE_lib_id.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_screen.h" #include "UI_interface.h" diff --git a/source/blender/modifiers/intern/MOD_curve.c b/source/blender/modifiers/intern/MOD_curve.c index 491827720f0..a2348539779 100644 --- a/source/blender/modifiers/intern/MOD_curve.c +++ b/source/blender/modifiers/intern/MOD_curve.c @@ -38,6 +38,7 @@ #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index d562559d66d..7c119f4b128 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -41,6 +41,7 @@ #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_object.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_laplaciandeform.c b/source/blender/modifiers/intern/MOD_laplaciandeform.c index b7975bec77a..c6b36212857 100644 --- a/source/blender/modifiers/intern/MOD_laplaciandeform.c +++ b/source/blender/modifiers/intern/MOD_laplaciandeform.c @@ -42,6 +42,7 @@ #include "BKE_mesh.h" #include "BKE_mesh_mapping.h" #include "BKE_mesh_runtime.h" +#include "BKE_mesh_wrapper.h" #include "BKE_particle.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c index 130c280c5f2..bcbc21c557b 100644 --- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c +++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c @@ -39,6 +39,7 @@ #include "BKE_editmesh.h" #include "BKE_lib_id.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c index 31cfe3bb407..4d96638fc83 100644 --- a/source/blender/modifiers/intern/MOD_lattice.c +++ b/source/blender/modifiers/intern/MOD_lattice.c @@ -36,6 +36,7 @@ #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index c24515e01eb..0d4ee8633c1 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -42,6 +42,7 @@ #include "BKE_lib_query.h" #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c index c0f7a0a7db0..765773c9e2b 100644 --- a/source/blender/modifiers/intern/MOD_shrinkwrap.c +++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c @@ -36,6 +36,7 @@ #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_screen.h" #include "BKE_shrinkwrap.h" diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c index 3a3b3a4f3ce..668b83db41e 100644 --- a/source/blender/modifiers/intern/MOD_simpledeform.c +++ b/source/blender/modifiers/intern/MOD_simpledeform.c @@ -38,6 +38,7 @@ #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_smooth.c b/source/blender/modifiers/intern/MOD_smooth.c index 21313746ce3..f25bb52f2c7 100644 --- a/source/blender/modifiers/intern/MOD_smooth.c +++ b/source/blender/modifiers/intern/MOD_smooth.c @@ -38,6 +38,7 @@ #include "BKE_editmesh.h" #include "BKE_lib_id.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_particle.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c index 8c7227d5b82..fbd8d7d27ec 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -40,6 +40,7 @@ #include "BKE_lib_query.h" #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_screen.h" diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 4999c77c355..1aee545aa43 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -43,6 +43,7 @@ #include "BKE_lattice.h" #include "BKE_lib_id.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_object.h" #include "BKE_modifier.h" diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index eab8ba478aa..339566354db 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -41,6 +41,7 @@ #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "BKE_screen.h" #include "BKE_texture.h" diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c index f3872869120..6a818629979 100644 --- a/source/blender/modifiers/intern/MOD_wave.c +++ b/source/blender/modifiers/intern/MOD_wave.c @@ -39,6 +39,7 @@ #include "BKE_lib_id.h" #include "BKE_lib_query.h" #include "BKE_mesh.h" +#include "BKE_mesh_wrapper.h" #include "BKE_scene.h" #include "BKE_screen.h" #include "BKE_texture.h" |