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.
27 lines
511 B
C++
27 lines
511 B
C++
#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);
|