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-11-17 07:46:48 +0300
committerJoseph Eagar <joeedh@gmail.com>2006-11-17 07:46:48 +0300
commit8768707610fbc1cea2bde069cdfd6d3f3e2fc522 (patch)
treefb8347ad36f60dede2883b587688184c3631cbcc /source/blender/python/api2_2x/IDProp.h
parent24f4440d05aa626f35c27758698af396ea94ff76 (diff)
=ID Properties=
This commit adds supports for per-ID properties to blender. See http://mediawiki.blender.org/index.php/BlenderDev/ID_Property for more information on how it all works. ID properties are accesable by python; but note that bindings have only been added to Object and Material thus far. However adding more bindings is easy and I plan on adding several more hopefully within an hour of this inital commit. A generic UI panel is also planned, that will go wherever its needed; for example in the material buttons, editing buttons, etc. I'll likely submit the initial code for that as a patch, though, so matt and ton and others can go over it and make sure it's all good. :) VERY important, if you intend to use ID properties please go to http://mediawiki.blender.org/index.php/BlenderDev/PropertyStandards and start writing the appropriate standards for it.
Diffstat (limited to 'source/blender/python/api2_2x/IDProp.h')
-rw-r--r--source/blender/python/api2_2x/IDProp.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/IDProp.h b/source/blender/python/api2_2x/IDProp.h
new file mode 100644
index 00000000000..5fdac5611f4
--- /dev/null
+++ b/source/blender/python/api2_2x/IDProp.h
@@ -0,0 +1,26 @@
+#include <Python.h>
+
+struct ID;
+struct IDProperty;
+struct BPy_IDGroup_Iter;
+
+typedef struct BPy_IDProperty {
+ PyObject_VAR_HEAD
+ struct ID *id;
+ struct IDProperty *prop;
+ PyObject *data_wrap;
+} BPy_IDProperty;
+
+typedef struct BPy_IDArray {
+ PyObject_VAR_HEAD
+ struct ID *id;
+ struct IDProperty *prop;
+} BPy_IDArray;
+
+typedef struct BPy_IDGroup_Iter {
+ PyObject_VAR_HEAD
+ BPy_IDProperty *group;
+ struct IDProperty *cur;
+} BPy_IDGroup_Iter;
+
+PyObject *BPy_Wrap_IDProperty(struct ID *id, struct IDProperty *prop);