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:
authorTon Roosendaal <ton@blender.org>2005-10-22 22:47:38 +0400
committerTon Roosendaal <ton@blender.org>2005-10-22 22:47:38 +0400
commit9e197399447007e64ee2f8aec36330fd55ddf44f (patch)
tree8aea7088bbb622398be33a158616bb1cf56af42a /source/blender/blenkernel/BKE_utildefines.h
parentfc169264cd9a6c6aa50e202b1bcb637bfccd65e0 (diff)
Various stuff in one commit;
- Added (BKE_utildefines.h) POINTER_TO_INT(poin) and INT_TO_POINTER(int) defines, to help fixing issues with switch to 64 bits systems. This assumes that a) not more than 16GB mem is used and b) that address space is below the 1<<35 value. The latter has to be confirmed, but it seems to conform the current 64 bits generation of OSs (for mallocs). Needless to say; use long if you want to store pointers! This is for temporal fixing. - Added editmesh version for mesh-octree lookups, not used yet. - Fix: ESC on armature posemode restored the actions, should not happen - Fix: If in NLA an action was 0 frame long, it caused draw error - Fix: Click on name in Action Window now activates Bones - Fix: "Snap to" options in Armature editmode now use X-axis mirror edit.
Diffstat (limited to 'source/blender/blenkernel/BKE_utildefines.h')
-rw-r--r--source/blender/blenkernel/BKE_utildefines.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h
index 8a5af1f7277..a18a43fb7b8 100644
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ b/source/blender/blenkernel/BKE_utildefines.h
@@ -58,7 +58,11 @@
#define ELEM7(a, b, c, d, e, f, g, h) ( ELEM3(a, b, c, d) || ELEM4(a, e, f, g, h) )
#define ELEM8(a, b, c, d, e, f, g, h, i) ( ELEM4(a, b, c, d, e) || ELEM4(a, f, g, h, i) )
-
+/* pointer magic, only to be used for the max 16 Gig mem period */
+/* note that int is signed! */
+#define POINTER_TO_INT(poin) (int)( ((long)(poin))>>3 )
+#define INT_TO_POINTER(int) (void *)( ((long)(int))<<3 )
+
/* string compare */
#define STREQ(str, a) ( strcmp((str), (a))==0 )
#define STREQ2(str, a, b) ( STREQ(str, a) || STREQ(str, b) )