Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-05-15 14:26:40 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-05-16 17:31:38 +0300
commitdef1c3eb4b5c2926431a1c975839e7719f06b38e (patch)
tree585024afc5aa554448bc566ca46e1e6098f02e3b /source/blender/blenkernel/BKE_mesh.h
parent76b5e38a76ecac4522edc72f310c88428cc2d23a (diff)
Particle System: ported most DerivedMesh → Mesh
There are a few places where DerivedMesh is still used, most notably when calling the (not yet ported) cloth simulation. There is also still the use of Object.derivedDeform and Object.derivedFinal. Those places are marked with a TODO. Some functions in the editors module were copied to accept Mesh. Those already had 'mesh' in the name; the copies are suffixed with '__real_mesh' for easy renaming later when the DM-based functionality is removed.
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r--source/blender/blenkernel/BKE_mesh.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 7525b496815..25b91be3791 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -31,6 +31,9 @@
* \ingroup bke
*/
+/* defines BLI_INLINE */
+#include "BLI_utildefines.h"
+
struct ID;
struct BMeshCreateParams;
struct BMeshFromMeshParams;
@@ -503,6 +506,20 @@ enum {
void BKE_mesh_batch_cache_dirty(struct Mesh *me, int mode);
void BKE_mesh_batch_cache_free(struct Mesh *me);
+
+/* Inlines */
+
+/* This is a copy of DM_origindex_mface_mpoly().
+ * Instead of -1 that function uses ORIGINDEX_NONE as defined in BKE_customdata.h,
+ * but I don't want to force every user of BKE_mesh.h to also include that file.
+ * ~~ Sybren */
+BLI_INLINE int BKE_mesh_origindex_mface_mpoly(
+ const int *index_mf_to_mpoly, const int *index_mp_to_orig, const int i)
+{
+ const int j = index_mf_to_mpoly[i];
+ return (j != -1) ? (index_mp_to_orig ? index_mp_to_orig[j] : j) : -1;
+}
+
#ifdef __cplusplus
}
#endif