diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-21 05:23:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-21 05:23:46 +0300 |
commit | 129585285c47a016cf93fb183117eb86ce544461 (patch) | |
tree | 22df9052a2b967f3055a2208476ec365c04168de /source/blender/makesrna/intern/rna_main.c | |
parent | a1b2c0c0fb7adb1758b0503a5422c377f8d0f73e (diff) |
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
Diffstat (limited to 'source/blender/makesrna/intern/rna_main.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 1ffba247dfc..b1840b9d216 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -194,13 +194,13 @@ static void rna_Main_particle_begin(CollectionPropertyIterator *iter, PointerRNA Main *bmain= (Main*)ptr->data; rna_iterator_listbase_begin(iter, &bmain->particle); } +#endif static void rna_Main_wm_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; rna_iterator_listbase_begin(iter, &bmain->wm); } -#endif #else @@ -213,6 +213,7 @@ void RNA_def_main(BlenderRNA *brna) {"objects", "Object", "rna_Main_object_begin", "Objects", "Object datablocks."}, {"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh datablocks."}, {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp datablocks."}, + {"windowmanagers", "WindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager datablocks."}, {NULL, NULL, NULL, NULL, NULL}, {"libraries", "Library", "rna_Main_library_begin", "Libraries", "Library datablocks."}, {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks."}, @@ -236,11 +237,10 @@ void RNA_def_main(BlenderRNA *brna) {"nodegroups", "NodeGroup", "rna_Main_nodetree_begin", "Node Groups", "Node group datablocks."}, {"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks."}, {"particles", "Particle", "rna_Main_particle_begin", "Particles", "Particle datablocks."}, - {"windowmanagers", "wmWindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager datablocks."}, {NULL, NULL, NULL, NULL, NULL}}; int i; - srna= RNA_def_struct(brna, "Main", "Main"); + srna= RNA_def_struct(brna, "Main", NULL, "Main"); for(i=0; lists[i][0]; i++) { |