diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-01 18:52:51 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-01 18:52:51 +0300 |
commit | fc7944f436657ce4a9a479aff3d5903b79bd6ede (patch) | |
tree | 3c24b2597feea93b7ca54ec7044406382771da4f /source/blender/makesrna/RNA_define.h | |
parent | a1961436f564ad885a014dc964d443378a4b9617 (diff) |
RNA
* Added support for sending notifiers and updates when setting
RNA properties. Per property, there is a notifier NC_/ND_ flag,
and a function that is called. Currently only used for
Object.loc/rot/size.
* RNA_property_update that does this is not automatically called
in every _set function, it has do be done separate, and is being
done by buttons with RNA data.
* Perhaps for python there could be a trick to accumulate these
flags rather than update each time, though for now the python
RNA code could just do them everytime. Did not add these calls
in the python code yet because it needs context, not sure where
to get that from?
Diffstat (limited to 'source/blender/makesrna/RNA_define.h')
-rw-r--r-- | source/blender/makesrna/RNA_define.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h index 359e387ebd8..49cb09ff020 100644 --- a/source/blender/makesrna/RNA_define.h +++ b/source/blender/makesrna/RNA_define.h @@ -44,10 +44,11 @@ void RNA_def_struct_sdna(StructRNA *srna, const char *structname); void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const char *propname); 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_refine_func(StructRNA *srna, const char *refine); void RNA_def_struct_identifier(StructRNA *srna, const char *identifier); void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description); void RNA_struct_free(BlenderRNA *brna, StructRNA *srna); + /* Property */ PropertyRNA *RNA_def_property(StructRNA *srna, const char *identifier, int type, int subtype); @@ -83,7 +84,9 @@ 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 *editable); +void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *updatefunc); +void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable); + 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, const char *range); void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range); |