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/python/api2_2x/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/python/api2_2x/IDProp.h')
-rw-r--r--source/blender/python/api2_2x/IDProp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/IDProp.h b/source/blender/python/api2_2x/IDProp.h
index a541165f104..5fcf4f6e1b7 100644
--- a/source/blender/python/api2_2x/IDProp.h
+++ b/source/blender/python/api2_2x/IDProp.h
@@ -51,7 +51,11 @@ typedef struct BPy_IDGroup_Iter {
PyObject_VAR_HEAD
BPy_IDProperty *group;
struct IDProperty *cur;
+ int mode;
} BPy_IDGroup_Iter;
PyObject *BPy_Wrap_IDProperty(struct ID *id, struct IDProperty *prop, struct IDProperty *parent);
void IDProp_Init_Types(void);
+
+#define IDPROP_ITER_KEYS 0
+#define IDPROP_ITER_ITEMS 1