UI: Asset Shelf (Experimental Feature) #104831
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue