Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2006-12-17 02:54:45 +0300
committerJoseph Eagar <joeedh@gmail.com>2006-12-17 02:54:45 +0300
commit3a84791b530ab2fdb5b0e9eccc7b77ac131e93a0 (patch)
tree81b8345fb837bd351d8bf748c7fef6c05d53dcf1 /source/blender/blenkernel/BKE_idprop.h
parent47ee194922e8fc071dcb74a703d542c73d47ffff (diff)
=IDProperties Python update=
Updated id properties interface as per discussed in python meeting. Basically, id properties are now entirely accessed through the dict-like interface if IDGroupType. Also, tp_getsetters are used throughout the code now. Using the dict interface allowed for a major cleanup of the wrapping code. The biggest change is that ID properties are no longer wrapped in a structure with .type .name and .data members; instead when you get properties from the group it returns the direct value. Ints, strings and floats return simple python types, while arrays and groups return special wrappers though. This means to detect the type of an ID property, you have to use type(). For string and int types this is easy; for group and array types (which of course have their own wrappers) you use type() with Blender.IDGroupType or Blender.IDArrayType. Update of epydocs plus a temporary gui script will be forthcoming; the gui script will be removed before release as of course by then we'll have a built-in gui for id properties.
Diffstat (limited to 'source/blender/blenkernel/BKE_idprop.h')
-rw-r--r--source/blender/blenkernel/BKE_idprop.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h
index 1e82b2a3758..eed2d7d1ac5 100644
--- a/source/blender/blenkernel/BKE_idprop.h
+++ b/source/blender/blenkernel/BKE_idprop.h
@@ -95,6 +95,10 @@ be reorganized to work properly.
*/
int IDP_AddToGroup(struct IDProperty *group, struct IDProperty *prop);
+/*this is the same as IDP_AddToGroup, only you pass an item
+ in the group list to be inserted after.*/
+int IDP_InsertToGroup(struct IDProperty *group, struct IDProperty *previous,
+ struct IDProperty *pnew);
/*NOTE: this does not free the property!!