From 7fcb5d33ffec43da4f98d4a84b1cbb35d068c9a5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 10 Dec 2009 09:38:58 +0000 Subject: values that had units set would not be coerced into Mathutils types by the python api. eg. scene.cursor_location wasnt a vector --- source/blender/makesrna/RNA_types.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/RNA_types.h') 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 -- cgit v1.2.3