Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-04-16 15:09:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-16 15:13:05 +0300
commitafd8e4bce7937baf016b973c091da3d954ffaf76 (patch)
tree32ccbdf520d17e35fb5a85ab8b13f9f172ee9cb7 /source/blender/blenloader/BLO_readfile.h
parent68c4ba348213b66543cdcd21da755fefaf286ef2 (diff)
Fix BLO_library_temp_load_id loading temporary ID's into G.main
The intention with this API function was to temporarily load ID's tagged LIB_TAG_TEMP_MAIN, however the way the `real_main` was used, these ID's were loaded into the G.main.
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r--source/blender/blenloader/BLO_readfile.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index d8c613ba900..89db216aada 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -226,7 +226,10 @@ int BLO_library_link_copypaste(struct Main *mainl, BlendHandle *bh, const uint64
* Struct for temporarily loading datablocks from a blend file.
*/
typedef struct TempLibraryContext {
- struct Main *temp_main;
+ /** Temporary main used for library data. */
+ struct Main *bmain_lib;
+ /** Temporary main used to load data into (currently initialized from `real_main`). */
+ struct Main *bmain_base;
struct BlendHandle *blendhandle;
struct LibraryLink_Params liblink_params;
struct Library *lib;