[Bf-blender-cvs] [cdacfc2f479] asset-uuid: Some more minor fixes/cleanups.

Bastien Montagne noreply at git.blender.org
Tue Nov 26 17:46:11 CET 2019


Commit: cdacfc2f47915578ae54ba913b2ee4092a66ef43
Author: Bastien Montagne
Date:   Tue Nov 26 17:45:55 2019 +0100
Branches: asset-uuid
https://developer.blender.org/rBcdacfc2f47915578ae54ba913b2ee4092a66ef43

Some more minor fixes/cleanups.

===================================================================

M	source/blender/blenkernel/intern/asset_engine.c
M	source/blender/blenkernel/intern/library_query.c

===================================================================

diff --git a/source/blender/blenkernel/intern/asset_engine.c b/source/blender/blenkernel/intern/asset_engine.c
index 60c27a44eff..cc01bfe38e7 100644
--- a/source/blender/blenkernel/intern/asset_engine.c
+++ b/source/blender/blenkernel/intern/asset_engine.c
@@ -53,6 +53,7 @@ void BKE_asset_uuid_runtime_reset(AssetUUID *uuid) {
   uuid->ibuff = NULL;
   uuid->width = uuid->height = 0;
   uuid->tag = 0;
+  uuid->id = NULL;
 }
 
 unsigned int BKE_asset_uuid_hash(const void *key)
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index ca3da0d89c7..cd7f03949f3 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -428,6 +428,10 @@ static void library_foreach_ID_link(Main *bmain,
       continue;
     }
 
+    /* Generic ID handling. */
+    /* Note: strictly runtime, short-life utility pointers like ID.newid or ID.uuid.id are
+     * purposedly completely ignored here. */
+
     if (id->override_library != NULL) {
       CALLBACK_INVOKE_ID(id->override_library->reference,
                          IDWALK_CB_USER | IDWALK_CB_OVERRIDE_LIBRARY_REFERENCE);
@@ -442,6 +446,7 @@ static void library_foreach_ID_link(Main *bmain,
       library_foreach_animationData(&data, adt);
     }
 
+    /* ID handling specific to each data type. */
     switch ((ID_Type)GS(id->name)) {
       case ID_LI: {
         Library *lib = (Library *)id;



More information about the Bf-blender-cvs mailing list