diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-04-16 15:09:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-04-16 15:13:05 +0300 |
commit | afd8e4bce7937baf016b973c091da3d954ffaf76 (patch) | |
tree | 32ccbdf520d17e35fb5a85ab8b13f9f172ee9cb7 /source/blender/blenloader/BLO_readfile.h | |
parent | 68c4ba348213b66543cdcd21da755fefaf286ef2 (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.h | 5 |
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; |