diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-29 18:10:42 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-29 18:10:42 +0300 |
commit | 58d6cbba6da31db8dc8a2b42d528b9a353081904 (patch) | |
tree | 04b57a2f809c6f08d84a082edf061f3ece631860 /source/blender/makesdna/DNA_ID.h | |
parent | 94549adec4b6857fb6ec4cf77606da51ff7c26b7 (diff) | |
parent | 295d0c52a26730edc6d4ed1276e4051cce006be5 (diff) |
Merge branch 'master' into temp-ghash-setopstemp-ghash-setops
Diffstat (limited to 'source/blender/makesdna/DNA_ID.h')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index b51b53cc801..f68de03614b 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -155,20 +155,36 @@ typedef struct Library { enum eIconSizes { ICON_SIZE_ICON = 0, - ICON_SIZE_PREVIEW = 1 + ICON_SIZE_PREVIEW = 1, + + NUM_ICON_SIZES +}; + +/* for PreviewImage->flag */ +enum ePreviewImage_Flag { + PRV_CHANGED = (1 << 0), + PRV_USER_EDITED = (1 << 1), /* if user-edited, do not auto-update this anymore! */ }; -#define NUM_ICON_SIZES (ICON_SIZE_PREVIEW + 1) typedef struct PreviewImage { /* All values of 2 are really NUM_ICON_SIZES */ unsigned int w[2]; unsigned int h[2]; - short changed[2]; + short flag[2]; short changed_timestamp[2]; unsigned int *rect[2]; + + /* Runtime-only data. */ struct GPUTexture *gputexture[2]; + int icon_id; /* Used by previews outside of ID context. */ + + char pad[3]; + char use_deferred; /* for now a mere bool, if we add more deferred loading methods we can switch to bitflag. */ } PreviewImage; +#define PRV_DEFERRED_DATA(prv) \ + (CHECK_TYPE_INLINE(prv, PreviewImage *), BLI_assert((prv)->use_deferred), (void *)((prv) + 1)) + /** * Defines for working with IDs. * |