diff options
author | Joseph Eagar <joeedh@gmail.com> | 2006-12-01 06:04:36 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2006-12-01 06:04:36 +0300 |
commit | 71da111613758d289209a5df64f722f8c0926767 (patch) | |
tree | bbd8775f4f68cb9d8c22babf16637bfdc4f44a3e /source/blender/blenkernel/BKE_idprop.h | |
parent | b36b940807011e0d85a0030933617ac6d0ec02bb (diff) |
=IDProperties bugfix=
Another bug from the tracker, reported by Mike Stramba.
A duplicated Py_XDECREF in the wrong place made assigning
arrays from Vector objects not work.
Also, fixed nasty bug in C API of idproperties (the function
to look up a property from a group was broken). Fixed a memory
leak too.
In addition, made "del group['property']" delete properties
from group; previously this would just crash (or at least it
should have). Added a small addition to the example in the
epydocs for IDGroup.
Diffstat (limited to 'source/blender/blenkernel/BKE_idprop.h')
-rw-r--r-- | source/blender/blenkernel/BKE_idprop.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index 0a3e0634411..3a5e84b490e 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -94,7 +94,17 @@ struct. In the future this will just be IDP_FreeProperty and the code will be reorganized to work properly. */ int IDP_AddToGroup(struct IDProperty *group, struct IDProperty *prop); + + +/*NOTE: this does not free the property!! + + To free the property, you have to do: + IDP_FreeProperty(prop); //free all subdata + MEM_freeN(prop); //free property struct itself + +*/ void IDP_RemFromGroup(struct IDProperty *group, struct IDProperty *prop); + IDProperty *IDP_GetPropertyFromGroup(struct IDProperty *prop, char *name); /*Get an iterator to iterate over the members of an id property group. |