[Bf-blender-cvs] [966fef9d349] asset-engine: Merge branch 'blender2.8' into asset-engine
Bastien Montagne
noreply at git.blender.org
Tue Apr 10 18:24:41 CEST 2018
Commit: 966fef9d34930a258ea58c9ea23743c5d56816a8
Author: Bastien Montagne
Date: Tue Apr 10 18:24:09 2018 +0200
Branches: asset-engine
https://developer.blender.org/rB966fef9d34930a258ea58c9ea23743c5d56816a8
Merge branch 'blender2.8' into asset-engine
Conflicts:
source/blender/blenloader/intern/readfile.c
source/blender/makesrna/intern/rna_ID.c
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_info.py
index 54beb5ce4b7,cbe6449d1df..cb84085b8ae
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@@ -83,17 -84,8 +84,17 @@@ class INFO_HT_header(Header)
row.label(bpy.app.autoexec_fail_message)
return
+ if (bpy.app.assets_fail or bpy.app.assets_need_reload) and not bpy.app.assets_quiet:
+ row.operator("script.assets_warn_clear", text="Ignore")
+ if bpy.app.assets_need_reload is True and bpy.app.assets_quiet is False:
+ row.operator("wm.assets_reload", icon='SCREEN_BACK', text="Reload Assets")
+ row.label("Some assets have to be reloaded", icon='INFO')
+ if bpy.app.assets_fail is True and bpy.app.assets_quiet is False:
+ row.label("Some asset engine(s) failed to retrieve updated data about their assets...", icon='ERROR')
+ return
+
row.operator("wm.splash", text="", icon='BLENDER', emboss=False)
- row.label(text=scene.statistics(workspace, context.view_layer), translate=False)
+ row.label(text=scene.statistics(context.view_layer), translate=False)
class INFO_MT_editor_menus(Menu):
diff --cc source/blender/blenloader/intern/readfile.c
index 1f4a96ac43d,7ae8f0410c5..0d5467eb744
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -8557,11 -8554,7 +8572,11 @@@ static BHead *read_libblock(FileData *f
*r_id = id;
if (!id)
return blo_nextbhead(fd, bhead);
--
- id->tag = tag | LIB_TAG_NEED_LINK;
++
+#ifdef DEBUG_LIBRARY
+ printf("id: %s (%p, %p), lib: %p\n", id->name, id, id->uuid, main->curlib);
+#endif
++
id->lib = main->curlib;
id->us = ID_FAKE_USERS(id);
id->icon_id = 0;
@@@ -8571,31 -8564,12 +8586,31 @@@
/* this case cannot be direct_linked: it's just the ID part */
if (bhead->code == ID_ID) {
+ /* That way, we know which datablock needs do_versions (required currently for linking). */
+ id->tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_NEW;
+
+ 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/makesrna/intern/rna_ID.c
index 285a4957592,088b2b67af5..b0ecf93ce40
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@@ -793,29 -793,14 +793,37 @@@ static int rna_ID_is_updated_data_get(P
return ((data->recalc & ID_RECALC_ALL) != 0);
}
+static void rna_ID_asset_dependencies_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+{
+ ID *id = ptr->data;
+
+ if (id->uuid && id->lib) {
+ AssetRef *aref = BKE_library_asset_repository_asset_find(id->lib, id);
+ if (aref) {
+ rna_iterator_listbase_begin(iter, &aref->id_list, NULL);
+ return;
+ }
+ }
+ rna_iterator_listbase_begin(iter, NULL, NULL);
+}
+
+static PointerRNA rna_ID_asset_dependencies_get(CollectionPropertyIterator *iter)
+{
+ ListBaseIterator *internal = &iter->internal.listbase;
+ PointerRNA ptr;
+
+ RNA_id_pointer_create((ID *)((LinkData *)internal->link)->data, &ptr);
+ return ptr;
+}
+
+ static IDProperty *rna_IDPropertyWrapPtr_idprops(PointerRNA *ptr, bool UNUSED(create))
+ {
+ if (ptr == NULL) {
+ return NULL;
+ }
+ return ptr->data;
+ }
+
#else
static void rna_def_ID_properties(BlenderRNA *brna)
More information about the Bf-blender-cvs
mailing list