UI: Asset Shelf (Experimental Feature) #104831

Closed
Julian Eisel wants to merge 399 commits from asset-shelf into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 9 additions and 1 deletions
Showing only changes of commit 7b61dde976 - Show all commits

View File

@ -520,6 +520,11 @@ int ED_asset_shelf_context(const bContext *C, const char *member, bContextDataRe
return CTX_RESULT_NO_DATA;
}
if (shelf_region->flag & RGN_FLAG_POLL_FAILED) {
/* Don't return data when the region "doesn't exist" (poll failed). */
return CTX_RESULT_NO_DATA;
}
const RegionAssetShelf *shelf_regiondata = RegionAssetShelf::get_from_asset_shelf_region(
*shelf_region);
if (!shelf_regiondata) {

View File

@ -816,7 +816,10 @@ typedef struct AssetShelf {
typedef struct RegionAssetShelf {
/** Owning list of previously activated asset shelves. */
ListBase shelves;
/** The currently active shelf, if any. Updated on redraw, so that context changes are reflected.
/**
* The currently active shelf, if any. Updated on redraw, so that context changes are reflected.
* Note that this may still be set even though the shelf isn't available anymore
* (#AssetShelfType.poll() fails). The pointer isn't necessarily unset when polling.
*/
AssetShelf *active_shelf; /* Non-owning. */
#ifdef __cplusplus