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
This commit is contained in:
Hans Goudey 2020-10-27 20:12:42 -05:00
parent 9dac5456b9
commit 5711b85147
2 changed files with 0 additions and 39 deletions

View File

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

View File

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