diff options
author | Julian Eisel <julian@blender.org> | 2022-04-26 23:23:52 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-04-26 23:23:52 +0300 |
commit | 5fe1624b0eba8267325f166de8e75c4d2dd6989b (patch) | |
tree | d7ea9f084ba06a11bd0bd97490b00825fefaaf94 /source/blender/blenkernel/BKE_context.h | |
parent | 8016d8a4bd21b2c113f0e2c9252d658cd48a5bd8 (diff) |
UI: Support setting context for buttons without layout
It was possible to set context pointers for buttons via the layout, but
not for buttons in places where the layout system wasn't used (where
buttons are placed manually). This is needed for buttons in the
Outliner, see D14653.
Diffstat (limited to 'source/blender/blenkernel/BKE_context.h')
-rw-r--r-- | source/blender/blenkernel/BKE_context.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 584568b4a5e..f441203d9d6 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -10,6 +10,8 @@ /* XXX temporary, until AssetHandle is designed properly and queries can return a pointer to it. */ #include "DNA_asset_types.h" +#include "BLI_utildefines.h" + #include "DNA_listBase.h" #include "DNA_object_enums.h" #include "RNA_types.h" @@ -136,6 +138,9 @@ bContextStore *CTX_store_add(ListBase *contexts, const char *name, const Pointer bContextStore *CTX_store_add_all(ListBase *contexts, bContextStore *context); bContextStore *CTX_store_get(bContext *C); void CTX_store_set(bContext *C, bContextStore *store); +const PointerRNA *CTX_store_ptr_lookup(const bContextStore *store, + const char *name, + const StructRNA *type CPP_ARG_DEFAULT(nullptr)); bContextStore *CTX_store_copy(bContextStore *store); void CTX_store_free(bContextStore *store); void CTX_store_free_list(ListBase *contexts); |