diff options
-rw-r--r-- | source/blender/blenkernel/BKE_idprop.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/idprop.c | 37 |
2 files changed, 0 insertions, 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 |