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:
authorAntony Riakiotakis <kalast@gmail.com>2014-04-16 06:31:02 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-04-16 06:31:02 +0400
commit556590fa3a9757f5ee21d923ce38471c343495b7 (patch)
tree7f6904650d4414ef0deb478a41b309365890bc8b /source/blender/bmesh/bmesh_class.h
parentb179647d52ae17eb9af243f0307398146ac2744d (diff)
Dyntopo:
Store PBVH node ID in CustomData. This avoids a number of hash deletions and checks/insertions on big hashes.
Diffstat (limited to 'source/blender/bmesh/bmesh_class.h')
-rw-r--r--source/blender/bmesh/bmesh_class.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index ea7505bcba4..83b02764046 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -285,6 +285,12 @@ extern void bpy_bm_generic_invalidate(struct BPy_BMGeneric *self);
typedef bool (*BMElemFilterFunc)(BMElem *, void *user_data);
/* defines */
+#define BM_ELEM_CD_SET_INT(ele, offset, f) \
+ { assert(offset != -1); *((int *)((char *)(ele)->head.data + (offset))) = (f); } (void)0
+
+#define BM_ELEM_CD_GET_INT(ele, offset) \
+ (assert(offset != -1), *((int *)((char *)(ele)->head.data + (offset))))
+
#define BM_ELEM_CD_GET_VOID_P(ele, offset) \
(assert(offset != -1), (void *)((char *)(ele)->head.data + (offset)))