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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-21 05:23:46 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-21 05:23:46 +0300
commit129585285c47a016cf93fb183117eb86ce544461 (patch)
tree22df9052a2b967f3055a2208476ec365c04168de /source/blender/makesrna/RNA_define.h
parenta1b2c0c0fb7adb1758b0503a5422c377f8d0f73e (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/RNA_define.h')
-rw-r--r--source/blender/makesrna/RNA_define.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index 1425bbb3c47..df66613a94b 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -25,12 +25,7 @@
#ifndef RNA_DEFINE_H
#define RNA_DEFINE_H
-/* Functions used during preprocess, for defining the RNA.
- *
- * This is currently only used internally in the module, but should eventually
- * also become available outside of that, at runtime for python and plugins.
- * Where the result of such runtime RNA is stored and how it integrates needs
- * to be figured out still. */
+/* Functions used during preprocess and runtime, for defining the RNA. */
#include "DNA_listBase.h"
#include "RNA_types.h"
@@ -40,13 +35,16 @@
BlenderRNA *RNA_create(void);
void RNA_define_free(BlenderRNA *brna);
void RNA_free(BlenderRNA *brna);
+void RNA_exit(void);
/* Struct */
-StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *name);
+StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from, const char *name);
void RNA_def_struct_sdna(StructRNA *srna, const char *structname);
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop);
void RNA_def_struct_flag(StructRNA *srna, int flag);
+void RNA_def_struct_funcs(StructRNA *srna, const char *notify, const char *refine);
+void RNA_def_struct_identifier(StructRNA *srna, const char *identifier, const char *name);
/* Property */
@@ -80,7 +78,7 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value);
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description);
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision);
-void RNA_def_property_funcs(PropertyRNA *prop, const char *notify, const char *readonly);
+void RNA_def_property_funcs(PropertyRNA *prop, const char *notify);
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set);
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set);
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set);