diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 8e24e9a8364..b1818cae62a 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -709,6 +709,14 @@ void RNA_define_animate_sdna(bool animate) } #endif +#ifndef RNA_RUNTIME +void RNA_define_fallback_property_update(int noteflag, const char *updatefunc) +{ + DefRNA.fallback.property_update.noteflag = noteflag; + DefRNA.fallback.property_update.updatefunc = updatefunc; +} +#endif + void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *ext) { #ifdef RNA_RUNTIME @@ -1413,6 +1421,12 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, } /* TODO: do we want that for runtime-defined stuff too? I’d say no, but... maybe yes :/ */ +#ifndef RNA_RUNTIME + /* Both are typically cleared. */ + RNA_def_property_update( + prop, DefRNA.fallback.property_update.noteflag, DefRNA.fallback.property_update.updatefunc); +#endif + rna_addtail(&cont->properties, prop); return prop; |