diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_idprop.h')
-rw-r--r-- | source/blender/blenkernel/BKE_idprop.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index 0e0d76f4284..e71ad5c8a24 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,12 +28,17 @@ #ifndef _BKE_IDPROP_H #define _BKE_IDPROP_H +/** \file BKE_idprop.h + * \ingroup bke + * \author Joseph Eagar + */ + #include "DNA_ID.h" struct IDProperty; struct ID; -typedef union { +typedef union IDPropertyTemplate { int i; float f; double d; @@ -72,8 +77,8 @@ void IDP_UnlinkArray(struct IDProperty *prop); /* ---------- String Type ------------ */ IDProperty *IDP_NewString(const char *st, const char *name, int maxlen);/* maxlen excludes '\0' */ -void IDP_AssignString(struct IDProperty *prop, char *st, int maxlen); /* maxlen excludes '\0' */ -void IDP_ConcatStringC(struct IDProperty *prop, char *st); +void IDP_AssignString(struct IDProperty *prop, const char *st, int maxlen); /* maxlen excludes '\0' */ +void IDP_ConcatStringC(struct IDProperty *prop, const char *st); void IDP_ConcatString(struct IDProperty *str1, struct IDProperty *append); void IDP_FreeString(struct IDProperty *prop); @@ -127,6 +132,8 @@ int IDP_InsertToGroup(struct IDProperty *group, struct IDProperty *previous, void IDP_RemFromGroup(struct IDProperty *group, struct IDProperty *prop); IDProperty *IDP_GetPropertyFromGroup(struct IDProperty *prop, const char *name); +/* same as above but ensure type match */ +IDProperty *IDP_GetPropertyTypeFromGroup(struct IDProperty *prop, const char *name, const char type); /*Get an iterator to iterate over the members of an id property group. Note that this will automatically free the iterator once iteration is complete; |