diff options
author | Hans Goudey <h.goudey@me.com> | 2020-10-28 04:12:42 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-10-28 04:12:42 +0300 |
commit | 5711b8514726a15a1cb1783fd56a0dda48b5b0a2 (patch) | |
tree | ba37ac8f3471db9ce689e95a398c7106518e38da /source/blender/blenkernel/intern | |
parent | 9dac5456b9b7315c21b51703c67e317f90dbbe13 (diff) |
Cleanup: Remove unused IDProperty function
This function from 2017 came with a comment: "TODO Nuke this once its
only user has been correctly converted to use generic IDmanagement"
Since it is unused after rB91462fbb31ba, now is time to remove it.
Differential Revision: https://developer.blender.org/D9368
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/idprop.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index 8f3bff7e9af..b0991f1d343 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -791,43 +791,6 @@ void IDP_CopyPropertyContent(IDProperty *dst, IDProperty *src) IDP_FreeProperty(idprop_tmp); } -/* Updates ID pointers after an object has been copied */ -/* TODO Nuke this once its only user has been correctly converted - * to use generic ID management from BKE_library! */ -void IDP_RelinkProperty(struct IDProperty *prop) -{ - if (!prop) { - return; - } - - switch (prop->type) { - case IDP_GROUP: { - LISTBASE_FOREACH (IDProperty *, loop, &prop->data.group) { - IDP_RelinkProperty(loop); - } - break; - } - case IDP_IDPARRAY: { - IDProperty *idp_array = IDP_Array(prop); - for (int i = 0; i < prop->len; i++) { - IDP_RelinkProperty(&idp_array[i]); - } - break; - } - case IDP_ID: { - ID *id = IDP_Id(prop); - if (id && id->newid) { - id_us_min(IDP_Id(prop)); - prop->data.pointer = id->newid; - id_us_plus(IDP_Id(prop)); - } - break; - } - default: - break; /* Nothing to do for other IDProp types. */ - } -} - /** * Get the Group property that contains the id properties for ID id. Set create_if_needed * to create the Group property and attach it to id if it doesn't exist; otherwise |