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

This commit is contained in:
Bastien Montagne 2021-09-16 12:39:40 +02:00
parent 4ec2bdbbda
commit 27b6636c45
1 changed files with 3 additions and 0 deletions

View File

@ -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);