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>2009-01-01 18:52:51 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-01 18:52:51 +0300
commitfc7944f436657ce4a9a479aff3d5903b79bd6ede (patch)
tree3c24b2597feea93b7ca54ec7044406382771da4f /source/blender
parenta1961436f564ad885a014dc964d443378a4b9617 (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')
-rw-r--r--source/blender/editors/interface/interface.c4
-rw-r--r--source/blender/editors/interface/interface_handlers.c11
-rw-r--r--source/blender/makesrna/RNA_access.h2
-rw-r--r--source/blender/makesrna/RNA_define.h7
-rw-r--r--source/blender/makesrna/SConscript1
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt2
-rw-r--r--source/blender/makesrna/intern/Makefile1
-rw-r--r--source/blender/makesrna/intern/SConscript5
-rw-r--r--source/blender/makesrna/intern/makesrna.c4
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_access.c14
-rw-r--r--source/blender/makesrna/intern/rna_controller.c2
-rw-r--r--source/blender/makesrna/intern/rna_define.c22
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c2
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h10
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c6
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c2
-rw-r--r--source/blender/makesrna/intern/rna_object.c17
-rw-r--r--source/blender/makesrna/intern/rna_property.c2
-rw-r--r--source/blender/makesrna/intern/rna_rna.c2
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c2
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c2
-rw-r--r--source/blender/makesrna/intern/rna_wm.c2
23 files changed, 80 insertions, 44 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 31629ca7621..51cc89505b9 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1584,8 +1584,8 @@ void ui_check_but(uiBut *but)
value= ui_get_but_val(but);
if(ui_is_but_float(but)) {
- if(value == FLT_MAX) sprintf(but->drawstr, "%sFLT_MAX", but->str);
- else if(value == -FLT_MAX) sprintf(but->drawstr, "%s-FLT_MAX", but->str);
+ if(value == FLT_MAX) sprintf(but->drawstr, "%sinf", but->str);
+ else if(value == -FLT_MAX) sprintf(but->drawstr, "%s-inf", but->str);
else if(but->a2) { /* amount of digits defined */
if(but->a2==1) sprintf(but->drawstr, "%s%.1f", but->str, value);
else if(but->a2==2) sprintf(but->drawstr, "%s%.2f", but->str, value);
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 17c3d6e3e69..c1b795f48f1 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -148,6 +148,9 @@ typedef struct uiAfterFunc {
const char *opname;
int opcontext;
IDProperty *opproperties;
+
+ PointerRNA rnapoin;
+ PropertyRNA *rnaprop;
} uiAfterFunc;
static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState state);
@@ -168,7 +171,7 @@ static void ui_apply_but_func(bContext *C, uiBut *but)
* handling is done, i.e. menus are closed, in order to avoid conflicts
* with these functions removing the buttons we are working with */
- if(but->func || block->handle_func || (but->type == BUTM && block->butm_func) || but->opname) {
+ if(but->func || block->handle_func || (but->type == BUTM && block->butm_func) || but->opname || but->rnaprop) {
after= MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc");
after->func= but->func;
@@ -189,6 +192,9 @@ static void ui_apply_but_func(bContext *C, uiBut *but)
after->opcontext= but->opcontext;
after->opproperties= but->opproperties;
+ after->rnapoin= but->rnapoin;
+ after->rnaprop= but->rnaprop;
+
but->opname= NULL;
but->opcontext= 0;
but->opproperties= NULL;
@@ -221,6 +227,9 @@ static void ui_apply_but_funcs_after(bContext *C)
IDP_FreeProperty(after->opproperties);
MEM_freeN(after->opproperties);
}
+
+ if(after->rnapoin.data)
+ RNA_property_update(C, &after->rnapoin, after->rnaprop);
}
BLI_freelistN(&funcs);
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index ce5160b66a4..29739b62615 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -269,7 +269,7 @@ const char *RNA_property_ui_description(PointerRNA *ptr, PropertyRNA *prop);
int RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop);
int RNA_property_evaluated(PointerRNA *ptr, PropertyRNA *prop);
-void RNA_property_notify(PropertyRNA *prop, struct bContext *C, PointerRNA *ptr);
+void RNA_property_update(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop);
/* Property Data */
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);
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 4b4c623027f..ace5b80a63c 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -7,5 +7,6 @@ o = SConscript('intern/SConscript')
objs += o
incs = '#/intern/guardedalloc ../blenkernel ../blenlib ../makesdna intern .'
+incs += ' ../windowmanager'
env.BlenderLib ( 'bf_rna', objs, Split(incs), [], libtype=['core'], priority = [195] )
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index fd9fce7a362..9936217efdc 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -66,7 +66,7 @@ SET(SRC
../../../../intern/guardedalloc/intern/mallocn.c
../../../../intern/guardedalloc/intern/mmap_win.c)
-INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib .)
+INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager .)
FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
# Build makesrna executable
diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile
index 0a1f10ed713..e844d74decf 100644
--- a/source/blender/makesrna/intern/Makefile
+++ b/source/blender/makesrna/intern/Makefile
@@ -34,6 +34,7 @@ CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../blenlib
CPPFLAGS += -I../../blenkernel
CPPFLAGS += -I../../makesdna
+CPPFLAGS += -I../../windowmanager
CPPFLAGS += -I..
CPPFLAGS += -I.
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index 93d91a3afa6..af0d67a0b9e 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -3,7 +3,7 @@ import sys
import os
Import ('env')
-cflags = ''
+cflags = '-Wall'
defines = []
root_build_dir=env['BF_BUILDDIR']
@@ -22,7 +22,8 @@ makesrna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
'../../blenlib',
'../../blenkernel',
'../../makesdna',
- '../../makesrna'])
+ '../../makesrna',
+ '../../windowmanager'])
if env['OURPLATFORM'] == 'linuxcross':
makesrna_tool.Replace(CC='gcc')
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index aac2c668c87..603533cfe1c 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -785,7 +785,7 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
rna_print_c_string(f, prop->name); fprintf(f, ",\n\t");
rna_print_c_string(f, prop->description); fprintf(f, ",\n");
fprintf(f, "\t%s, %s, %d,\n", rna_property_typename(prop->type), rna_property_subtypename(prop->subtype), prop->arraylength);
- fprintf(f, "\t%s, %s},\n", rna_function_string(prop->notify), rna_function_string(prop->editable));
+ fprintf(f, "\t%s, %d, %s},\n", rna_function_string(prop->update), prop->noteflag, rna_function_string(prop->editable));
switch(prop->type) {
case PROP_BOOLEAN: {
@@ -876,7 +876,7 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
if(srna->from) fprintf(f, "\t&RNA_%s,\n", (char*)srna->from);
else fprintf(f, "\tNULL,\n");
- fprintf(f, "\t%s, %s,\n", rna_function_string(srna->notify), rna_function_string(srna->refine));
+ fprintf(f, "\t%s,\n", rna_function_string(srna->refine));
prop= srna->properties.first;
if(prop) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s, ", srna->identifier, prop->identifier);
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index af72efcba28..ea87a8ec0f4 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -166,7 +166,7 @@ static void rna_def_ID(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "ID", "Used as a basis for dealing with many types with unique names, garbage collection and linked libraries");
RNA_def_struct_flag(srna, STRUCT_ID);
- RNA_def_struct_funcs(srna, NULL, "rna_ID_refine");
+ RNA_def_struct_refine_func(srna, "rna_ID_refine");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* must be unique */
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index d495477dd3d..c8c3a8605a8 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -27,14 +27,16 @@
#include "MEM_guardedalloc.h"
+#include "DNA_ID.h"
+#include "DNA_windowmanager_types.h"
+
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "BKE_idprop.h"
#include "BKE_utildefines.h"
-#include "DNA_ID.h"
-#include "DNA_windowmanager_types.h"
+#include "WM_api.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -507,12 +509,14 @@ int RNA_property_evaluated(PointerRNA *ptr, PropertyRNA *prop)
return (flag & PROP_EVALUATED);
}
-void RNA_property_notify(PropertyRNA *prop, struct bContext *C, PointerRNA *ptr)
+void RNA_property_update(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop)
{
rna_idproperty_check(&prop, ptr);
- if(prop->notify)
- prop->notify(C, ptr);
+ if(prop->update)
+ prop->update(C, ptr);
+ if(prop->noteflag)
+ WM_event_add_notifier(C, prop->noteflag, ptr->id.data);
}
/* Property Data */
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index eb32877b6c4..dc8f6c4538f 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -81,7 +81,7 @@ void RNA_def_controller(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Controller", NULL);
RNA_def_struct_ui_text(srna, "Controller", "logic brick to connect 'Sensors' to 'Actuators'");
RNA_def_struct_sdna(srna, "bController");
- RNA_def_struct_funcs(srna, NULL, "rna_Controller_refine");
+ RNA_def_struct_refine_func(srna, "rna_Controller_refine");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index a025fa67426..6c3e21cf5a5 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -521,18 +521,16 @@ void RNA_def_struct_flag(StructRNA *srna, int flag)
srna->flag= 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)
{
if(!DefRNA.preprocess) {
- fprintf(stderr, "RNA_def_struct_funcs: only during preprocessing.\n");
+ fprintf(stderr, "RNA_def_struct_refine_func: only during preprocessing.\n");
return;
}
- if(notify) srna->notify= (NotifyFunc)notify;
if(refine) srna->refine= (StructRefineFunc)refine;
}
-
void RNA_def_struct_identifier(StructRNA *srna, const char *identifier)
{
if(DefRNA.preprocess) {
@@ -1298,17 +1296,27 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
/* Functions */
-void RNA_def_property_funcs(PropertyRNA *prop, const char *notify, const char *editable)
+void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
{
if(!DefRNA.preprocess) {
- fprintf(stderr, "RNA_def_property_funcs: only during preprocessing.\n");
+ fprintf(stderr, "RNA_def_property_editable_func: only during preprocessing.\n");
return;
}
- if(notify) prop->notify= (NotifyFunc)notify;
if(editable) prop->editable= (EditableFunc)editable;
}
+void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
+{
+ if(!DefRNA.preprocess) {
+ fprintf(stderr, "RNA_def_struct_refine_func: only during preprocessing.\n");
+ return;
+ }
+
+ prop->noteflag= noteflag;
+ prop->update= (UpdateFunc)func;
+}
+
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
{
StructRNA *srna= DefRNA.laststruct;
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index 122605f672f..f9aaef726af 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -406,7 +406,7 @@ void RNA_def_fluidsim(BlenderRNA *brna)
srna= RNA_def_struct(brna, "FluidSettings", NULL);
RNA_def_struct_sdna(srna, "FluidsimSettings");
- RNA_def_struct_funcs(srna, NULL, "rna_FluidSettings_refine");
+ RNA_def_struct_refine_func(srna, "rna_FluidSettings_refine");
RNA_def_struct_ui_text(srna, "Fluid Simulation Settings", "");
/* enable and type */
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;
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 053ff2a8a5b..39984b0b150 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -864,18 +864,18 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
prop= RNA_def_property(srna, "texspace_loc", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Texure Space Location", "Texture space location");
- RNA_def_property_funcs(prop, NULL, texspace_editable);
+ RNA_def_property_editable_func(prop, texspace_editable);
prop= RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Texture Space Size", "Texture space size");
- RNA_def_property_funcs(prop, NULL, texspace_editable);
+ RNA_def_property_editable_func(prop, texspace_editable);
/* not supported yet
prop= RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_ROTATION);
RNA_def_property_float(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Texture Space Rotation", "Texture space rotation");
- RNA_def_property_funcs(prop, NULL, texspace_editable);*/
+ RNA_def_property_editable_func(prop, texspace_editable);*/
/* materials */
prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 9a6cd9f2d10..cf7a2c4ffbf 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -398,7 +398,7 @@ void RNA_def_modifier(BlenderRNA *brna)
/* data */
srna= RNA_def_struct(brna, "Modifier", NULL);
RNA_def_struct_ui_text(srna , "Object Modifier", "DOC_BROKEN");
- RNA_def_struct_funcs(srna, NULL, "rna_Modifier_refine");
+ RNA_def_struct_refine_func(srna, "rna_Modifier_refine");
RNA_def_struct_sdna(srna, "ModifierData");
/* strings */
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 032dcebae42..ead4b1162ee 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -33,8 +33,18 @@
#include "DNA_object_types.h"
#include "DNA_property_types.h"
+#include "WM_types.h"
+
#ifdef RNA_RUNTIME
+#include "BKE_context.h"
+#include "BKE_depsgraph.h"
+
+static void rna_Object_update(bContext *C, PointerRNA *ptr)
+{
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_OB);
+}
+
#else
void RNA_def_object(BlenderRNA *brna)
@@ -57,14 +67,15 @@ void RNA_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_ui_text(prop, "Location", "DOC_BROKEN");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
- //prop= RNA_def_property(srna, "rot", PROP_FLOAT, PROP_ROTATION);
- //RNA_def_property_ui_text(prop, "Rotation", "");
- prop= RNA_def_property(srna, "rot", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "rot", PROP_FLOAT, PROP_ROTATION);
RNA_def_property_ui_text(prop, "Rotation", "");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_ui_text(prop, "Scale", "DOC_BROKEN");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Ipo");
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index 3d6fcb6db80..4e21d033a96 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -87,7 +87,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
srna= RNA_def_struct(brna, "GameProperty", NULL);
RNA_def_struct_ui_text(srna , "Game Property", "DOC_BROKEN");
RNA_def_struct_sdna(srna, "bProperty");
- RNA_def_struct_funcs(srna, NULL, "rna_GameProperty_refine");
+ RNA_def_struct_refine_func(srna, "rna_GameProperty_refine");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* must be unique */
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 47bfb1c8a4e..f43d864ea5b 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -467,7 +467,7 @@ static void rna_def_property(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Property", NULL);
RNA_def_struct_ui_text(srna, "Property Definition", "DOC_BROKEN2");
- RNA_def_struct_funcs(srna, NULL, "rna_Property_refine");
+ RNA_def_struct_refine_func(srna, "rna_Property_refine");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 1896e1ece66..daad0a58689 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -98,7 +98,7 @@ void rna_def_sensor(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Sensor", NULL);
RNA_def_struct_ui_text(srna, "Sensor", "DOC_BROKEN");
RNA_def_struct_sdna(srna, "bSensor");
- RNA_def_struct_funcs(srna, NULL, "rna_Sensor_refine");
+ RNA_def_struct_refine_func(srna, "rna_Sensor_refine");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Sensor name.");
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 51958563c80..7b5d2e85d37 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -277,7 +277,7 @@ static void rna_def_sequence(BlenderRNA *brna)
srna = RNA_def_struct(brna, "Sequence", NULL);
RNA_def_struct_ui_text(srna, "Sequence", "DOC_BROKEN");
- RNA_def_struct_funcs(srna, NULL, "rna_Sequence_refine");
+ RNA_def_struct_refine_func(srna, "rna_Sequence_refine");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_Sequence_name_get", "rna_Sequence_name_length", "rna_Sequence_name_set");
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 6e4f0fd9e93..fe809a18d4d 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -99,7 +99,7 @@ static void rna_def_operator(BlenderRNA *brna)
srna= RNA_def_struct(brna, "OperatorProperties", NULL);
RNA_def_struct_ui_text(srna, "Operator Properties", "DOC_BROKEN");
- RNA_def_struct_funcs(srna, NULL, "rna_OperatorProperties_refine");
+ RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine");
}
static void rna_def_operator_utils(BlenderRNA *brna)