[Bf-blender-cvs] [27b6636c452] master: Cleanup: Comment about shpaekey being treated as embedded IDs in `BKE_id_newptr_and_tag_clear`.

Bastien Montagne noreply at git.blender.org
Thu Sep 16 14:31:08 CEST 2021


Commit: 27b6636c4525bd051723d30a148c6a037ea169d8
Author: Bastien Montagne
Date:   Thu Sep 16 12:39:40 2021 +0200
Branches: master
https://developer.blender.org/rB27b6636c4525bd051723d30a148c6a037ea169d8

Cleanup: Comment about shpaekey being treated as embedded IDs in `BKE_id_newptr_and_tag_clear`.

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

M	source/blender/blenkernel/intern/lib_id.c

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

diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c
index daafa587feb..60b6d7ad66d 100644
--- a/source/blender/blenkernel/intern/lib_id.c
+++ b/source/blender/blenkernel/intern/lib_id.c
@@ -347,6 +347,9 @@ void BKE_id_newptr_and_tag_clear(ID *id)
   id->newid = NULL;
 
   /* Deal with embedded data too. */
+  /* NOTE: even though ShapeKeys are not technically embedded data currently, they behave as such
+   * in most cases, so for sake of consistency treat them as such here. Also mirrors the behavior
+   * in `BKE_lib_id_make_local`. */
   Key *key = BKE_key_from_id(id);
   if (key != NULL) {
     BKE_id_newptr_and_tag_clear(&key->id);



More information about the Bf-blender-cvs mailing list