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:
authorCampbell Barton <ideasman42@gmail.com>2009-03-11 20:28:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-03-11 20:28:37 +0300
commit64512d3e8e9f950b8249deb506eb243345dc107e (patch)
tree14c6d7ba33f8674b85aceede7730d91b871caae8 /source/blender/makesrna/intern/rna_internal_types.h
parent891c3bc663b0f1ece07bfd48e06853a9eedb6178 (diff)
WIP PyAPI from winter camp discussions, make subtypes of the base RNA python type, eventually allowing us to have python defined RNA classes in
python - lux/pov/renderman materials, lamps etc as well as operators. At the moment there are 2 ways to do this, The first is like subclassing from python, another (disabled) method copies the base PyTypeObject struct and makes some changes. The PyType is stored in the RNA Struct for reuse, right now there are no access functions - needs to be improved. Added a python script for printing all blend file data to the console which helps testing the api. dir(rna) wont work for python 2.x now, use rna.__dir__() instead.
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal_types.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 0eea4ea5d39..0c2eedff564 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -208,6 +208,10 @@ typedef struct CollectionPropertyRNA {
struct StructRNA {
struct StructRNA *next, *prev;
+ /* python type, this is a subtype of pyrna_struct_Type but used so each struct can have its own type
+ * which is useful for subclassing RNA */
+ void *py_type;
+
/* unique identifier */
const char *identifier;
/* various options */