From 3feb3ce32d7d1fddf745bf30592cf68d906c295f Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 8 Jul 2021 22:33:02 +0200 Subject: Assets: Expose active asset library in context For the Asset Browser, this returns the active asset library of the Asset Browser, otherwise it returns the one active in the workspace. This gives simple access to the active asset library from UI code and Python scripts. For example the upcoming Pose Library add-on uses this, as well as the upcoming asset view template. --- source/blender/blenkernel/BKE_context.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenkernel/BKE_context.h') diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 50aa6027840..416947e0b62 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -357,6 +357,8 @@ int CTX_data_visible_gpencil_layers(const bContext *C, ListBase *list); int CTX_data_editable_gpencil_layers(const bContext *C, ListBase *list); int CTX_data_editable_gpencil_strokes(const bContext *C, ListBase *list); +const struct AssetLibraryReference *CTX_wm_asset_library(const bContext *C); + bool CTX_wm_interface_locked(const bContext *C); /* Gets pointer to the dependency graph. -- cgit v1.2.3