diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-16 17:19:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-16 17:19:16 +0300 |
commit | 141f0f4c4717a8f6090515779de10e205455644b (patch) | |
tree | 51832cacd2aa1e0d1bd5a30a161f0833faa8b4f0 /source/blender | |
parent | 047950db7ccd9440b04fb4bff82844de764bd444 (diff) |
BKE_context: macro to access ID's while looping
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_context.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 4da6a61cbfa..6de323258bd 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -230,6 +230,10 @@ void CTX_data_list_add(bContextDataResult *result, void *data); BLI_freelistN(&ctx_data_list); \ } (void)0 +#define CTX_DATA_BEGIN_WITH_ID(C, Type, instance, member, Type_id, instance_id) \ + CTX_DATA_BEGIN(C, Type, instance, member) \ + Type_id instance_id = ctx_link->ptr.id.data; \ + int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBase *)); #define CTX_DATA_COUNT(C, member) \ |