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:
authorCampbell Barton <ideasman42@gmail.com>2013-01-10 08:43:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-10 08:43:31 +0400
commitceb9701507848865434557af4ec89ce9b6560446 (patch)
treef0374162d6ab4d7536cca7bfffb9c2eb399a4935 /source/blender/bmesh/bmesh_class.h
parent8cf374d4012e193a50a58f1e2abcdae306ae33cd (diff)
don't store bevel weights or edge crease customdata layers in editmode unless they are needed.
configurable in 'Geometry Data' panel, will be added when running crease edges transform for example.
Diffstat (limited to 'source/blender/bmesh/bmesh_class.h')
-rw-r--r--source/blender/bmesh/bmesh_class.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 5d7ded2024d..824884fb4e4 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -254,6 +254,18 @@ enum {
/* defines */
+#define BM_ELEM_CD_GET_VOID_P(ele, offset) \
+ ((void)0, (void *)((char *)(ele)->head.data + (offset)))
+
+#define BM_ELEM_CD_SET_FLOAT(ele, offset, f) \
+ { *((float *)((char *)(ele)->head.data + (offset))) = (f); } (void)0
+
+#define BM_ELEM_CD_GET_FLOAT(ele, offset) \
+ ((void)0, *((float *)((char *)(ele)->head.data + (offset))))
+
+#define BM_ELEM_CD_GET_FLOAT_AS_UCHAR(ele, offset) \
+ (unsigned char)(BM_ELEM_CD_GET_FLOAT(ele, offset) * 255.0f)
+
/*forward declarations*/
#ifdef USE_BMESH_HOLES