Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/idprop.c
| Show First 20 Lines • Show All 497 Lines • ▼ Show 20 Lines | if (other && prop->type == other->type) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void IDP_SyncGroupTypes(IDProperty *dest, const IDProperty *src, const bool do_arraylen) | void IDP_SyncGroupTypes(IDProperty *dest, const IDProperty *src, const bool do_arraylen) | ||||
| { | { | ||||
| LISTBASE_FOREACH_MUTABLE (IDProperty *, prop_dst, &src->data.group) { | LISTBASE_FOREACH_MUTABLE (IDProperty *, prop_dst, &dest->data.group) { | ||||
| const IDProperty *prop_src = IDP_GetPropertyFromGroup((IDProperty *)src, prop_dst->name); | const IDProperty *prop_src = IDP_GetPropertyFromGroup((IDProperty *)src, prop_dst->name); | ||||
| if (prop_src != NULL) { | if (prop_src != NULL) { | ||||
| /* check of we should replace? */ | /* check of we should replace? */ | ||||
| if ((prop_dst->type != prop_src->type || prop_dst->subtype != prop_src->subtype) || | if ((prop_dst->type != prop_src->type || prop_dst->subtype != prop_src->subtype) || | ||||
| (do_arraylen && ELEM(prop_dst->type, IDP_ARRAY, IDP_IDPARRAY) && | (do_arraylen && ELEM(prop_dst->type, IDP_ARRAY, IDP_IDPARRAY) && | ||||
| (prop_src->len != prop_dst->len))) { | (prop_src->len != prop_dst->len))) { | ||||
| BLI_insertlinkreplace(&dest->data.group, prop_dst, IDP_CopyProperty(prop_src)); | BLI_insertlinkreplace(&dest->data.group, prop_dst, IDP_CopyProperty(prop_src)); | ||||
| IDP_FreeProperty(prop_dst); | IDP_FreeProperty(prop_dst); | ||||
| ▲ Show 20 Lines • Show All 847 Lines • Show Last 20 Lines | |||||