diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-03 03:10:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-03 03:10:14 +0400 |
commit | 1a7638fa94fbe9c6244d054d20efa3405153747f (patch) | |
tree | 21a57b893f653ffdae29b9e4f4a4add9b90f8395 /source/blender/blenkernel/intern/idprop.c | |
parent | a4a3ed00186e0e73e20d1c85e90ea639e36653d1 (diff) |
add id property clear function (matching the same python function for dicts/lists)
Diffstat (limited to 'source/blender/blenkernel/intern/idprop.c')
-rw-r--r-- | source/blender/blenkernel/intern/idprop.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index 5dd0f08dc71..3be47668fb5 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -815,6 +815,13 @@ void IDP_FreeProperty(IDProperty *prop) } } +void IDP_ClearProperty(IDProperty *prop) +{ + IDP_FreeProperty(prop); + prop->data.pointer = NULL; + prop->len = prop->totallen = 0; +} + /* Unlinks any IDProperty<->ID linkage that might be going on. * note: currently unused.*/ void IDP_UnlinkProperty(IDProperty *prop) |