[Bf-blender-cvs] [2130d16076] asset-engine: Merge branch 'master' into asset-engine
Bastien Montagne
noreply at git.blender.org
Thu Jan 12 12:52:03 CET 2017
Commit: 2130d160765f35587b910469caf7973503a450e7
Author: Bastien Montagne
Date: Thu Jan 12 12:45:20 2017 +0100
Branches: asset-engine
https://developer.blender.org/rB2130d160765f35587b910469caf7973503a450e7
Merge branch 'master' into asset-engine
Conflicts:
source/blender/blenloader/intern/readfile.c
source/blender/makesdna/DNA_ID.h
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/readfile.c
index 1029ce2ee4,a63b9ed7d1..dfca479ec1
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -8126,28 -8116,12 +8132,31 @@@ static BHead *read_libblock(FileData *f
/* this case cannot be direct_linked: it's just the ID part */
if (bhead->code == ID_ID) {
+ if (id->uuid) {
+ /* read all data into fd->datamap */
+ bhead = read_data_into_oldnewmap(fd, bhead, __func__);
+
+ id->uuid = newdataadr(fd, id->uuid);
+ id->uuid->ibuff = NULL; /* Just in case... */
+ id->uuid->width = id->uuid->height = 0;
+
+ oldnewmap_free_unused(fd->datamap);
+ oldnewmap_clear(fd->datamap);
+ return bhead;
+ }
+
return blo_nextbhead(fd, bhead);
}
+
+ /* If we have a real ID from a virtual library, tag ID as extern. */
+ if (id->lib && (id->lib->flag & LIBRARY_FLAG_VIRTUAL)) {
+ BLI_assert(ID_VIRTUAL_LIBRARY_VALID(id));
+ id->tag |= LIB_TAG_EXTERN;
+ }
+ /* That way, we know which datablock needs do_versions (required currently for linking). */
+ id->tag |= LIB_TAG_NEW;
+
/* need a name for the mallocN, just for debugging and sane prints on leaks */
allocname = dataname(GS(id->name));
diff --cc source/blender/makesdna/DNA_ID.h
index 7bc66dbfb6,2c6f3d2fc6..7ea2141f0f
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@@ -236,20 -155,11 +236,22 @@@ typedef struct Library
struct PackedFile *packedfile;
+ AssetRepositoryRef *asset_repository;
+
- int temp_index;
-
+ short flag;
- short pad_s1;
++ short pad_s1[3];
++
+ /* Temp data needed by read/write code. */
+ int temp_index;
+ short versionfile, subversionfile; /* see BLENDER_VERSION, BLENDER_SUBVERSION, needed for do_versions */
} Library;
+/* Library.flag */
+enum {
+ /* The library does not actually exist, used to allow handling of files from asset engines. */
+ LIBRARY_FLAG_VIRTUAL = 1 << 0,
+};
+
enum eIconSizes {
ICON_SIZE_ICON = 0,
ICON_SIZE_PREVIEW = 1,
More information about the Bf-blender-cvs
mailing list