diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 00:39:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 00:39:39 +0400 |
commit | 9892736206676c5b7fabc8d1184f9655511ff2dd (patch) | |
tree | 83562ac50c93fe3004959d35c1af4a5b380fdd97 /source/blender/makesdna/DNA_ID.h | |
parent | cffaa42d3a34c6b310c3c87c98e1f8313881e473 (diff) |
code cleanup: header cleanup and remove some duplicate defines.
Diffstat (limited to 'source/blender/makesdna/DNA_ID.h')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 6 |
1 files changed, 5 insertions, 1 deletions
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 |