From 9892736206676c5b7fabc8d1184f9655511ff2dd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 12 May 2012 20:39:39 +0000 Subject: code cleanup: header cleanup and remove some duplicate defines. --- source/blender/makesdna/DNA_ID.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_ID.h') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 06eefc36723..777fcc2af0c 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -225,10 +225,14 @@ typedef struct PreviewImage { #define ID_BLEND_PATH(_bmain, _id) ((_id)->lib ? (_id)->lib->filepath : (_bmain)->name) #ifdef GS -#undef GS +# undef GS #endif #define GS(a) (*((short *)(a))) +#define ID_NEW(a) if ( (a) && (a)->id.newid ) (a) = (void *)(a)->id.newid +#define ID_NEW_US(a) if ( (a)->id.newid) { (a) = (void *)(a)->id.newid; (a)->id.us++; } +#define ID_NEW_US2(a) if (((ID *)a)->newid) { (a) = ((ID *)a)->newid; ((ID *)a)->us++; } + /* id->flag: set frist 8 bits always at zero while reading */ #define LIB_LOCAL 0 #define LIB_EXTERN 1 -- cgit v1.2.3