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>2009-12-10 12:38:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-10 12:38:58 +0300
commit7fcb5d33ffec43da4f98d4a84b1cbb35d068c9a5 (patch)
treed5bed0a0cef3eeb652b873611dbd85a2420c91d3 /source/blender/makesrna/RNA_types.h
parent24be31bda01e5aae56a7d637674a888f0ab54f80 (diff)
values that had units set would not be coerced into Mathutils types by the python api.
eg. scene.cursor_location wasnt a vector
Diffstat (limited to 'source/blender/makesrna/RNA_types.h')
-rw-r--r--source/blender/makesrna/RNA_types.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 18fb2700bbf..e771b495b96 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -84,8 +84,9 @@ typedef enum PropertyUnit {
PROP_UNIT_ACCELERATION = (8<<16) /* m/(s^2) */
} PropertyUnit;
-#define RNA_SUBTYPE_UNIT(subtype) (subtype & 0x00FF0000)
-#define RNA_SUBTYPE_UNIT_VALUE(subtype) (subtype>>16)
+#define RNA_SUBTYPE_UNIT(subtype) ((subtype) & 0x00FF0000)
+#define RNA_SUBTYPE_VALUE(subtype) ((subtype) & ~0x00FF0000)
+#define RNA_SUBTYPE_UNIT_VALUE(subtype) ((subtype)>>16)
#define RNA_ENUM_BITFLAG_SIZE 32