From d28aaf6139c8cfa8555542f4f228f390485dd7ed Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 20 Oct 2021 13:09:40 +0200 Subject: Asset Browser: Show current file assets in other asset libraries if contained If the current file is saved within an asset library, showing that asset library in the Asset Browser will also display the assets from this current file now. In fact, it's the latest state of the open file, including all unsaved modifications. These assets will show a little Blender icon in the preview image, which is our usual icon for current file data. Note that this means an important design change: The "Current File" asset library isn't the only place to edit assets from anymore. From now on assets from the current file can also be edited in the context of the full asset library. See T90193 for more info. Technical info: Besides just including the assets from the current `Main`, this requires partial clearing and reading of file-lists, so that asset operations (e.g. removing an asset data-block) doesn't require a full reload of the asset library. Maniphest Task: https://developer.blender.org/T90193 --- source/blender/editors/interface/interface.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/interface') diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index b47b63aa14c..b7458793f15 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -742,6 +742,9 @@ static bool ui_but_equals_old(const uiBut *but, const uiBut *oldbut) if (but->optype != oldbut->optype) { return false; } + if (but->dragtype != oldbut->dragtype) { + return false; + } if ((but->type == UI_BTYPE_TREEROW) && (oldbut->type == UI_BTYPE_TREEROW)) { uiButTreeRow *but_treerow = (uiButTreeRow *)but; -- cgit v1.2.3