From 5711b8514726a15a1cb1783fd56a0dda48b5b0a2 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 27 Oct 2020 20:12:42 -0500 Subject: 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 --- source/blender/blenkernel/BKE_idprop.h | 2 -- source/blender/blenkernel/intern/idprop.c | 37 ------------------------------- 2 files changed, 39 deletions(-) diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index 37a83a94079..9c250240e5e 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -147,8 +147,6 @@ void IDP_FreeProperty(struct IDProperty *prop); void IDP_ClearProperty(IDProperty *prop); -void IDP_RelinkProperty(struct IDProperty *prop); - void IDP_Reset(IDProperty *prop, const IDProperty *reference); #define IDP_Int(prop) ((prop)->data.val) 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 -- cgit v1.2.3