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/intern/rna_internal_types.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/intern/rna_internal_types.h')
-rw-r--r-- | source/blender/makesrna/intern/rna_internal_types.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index 525ed536dc6..89b0503239b 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -36,7 +36,7 @@ struct bContext; /* Function Callbacks */ -typedef void (*NotifyFunc)(struct bContext *C, struct PointerRNA *ptr); +typedef void (*UpdateFunc)(struct bContext *C, struct PointerRNA *ptr); typedef int (*EditableFunc)(struct PointerRNA *ptr); typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr); @@ -94,8 +94,9 @@ struct PropertyRNA { /* if an array this is > 0, specifying the length */ unsigned int arraylength; - /* callback for notifys on change */ - NotifyFunc notify; + /* callback for updates on change */ + UpdateFunc update; + int noteflag; /* callback for testing if editable/evaluated */ EditableFunc editable; @@ -226,9 +227,6 @@ struct StructRNA { /* struct this is derivedfrom */ struct StructRNA *from; - /* callback for notifys on change */ - NotifyFunc notify; - /* function to give the more specific type */ StructRefineFunc refine; |