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-12-09 13:55:28 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-09 13:55:28 +0300
commit3712e78d5257bc5681be120e15e3de4e05539f9b (patch)
tree8c03750a3c7ea7447647ddae445ffcd1292bcc35 /source/blender/makesrna/intern
parent9b6b74f292856dd8edf5bf9e9f172d95fc12d5e4 (diff)
RNA: fix for yesterday's commit, browsing screens and scenes was
not working anymore, relies on special notifiers.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_screen.c5
-rw-r--r--source/blender/makesrna/intern/rna_wm.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index da8f326caca..5311c80e45d 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -61,13 +61,13 @@ static void rna_Screen_scene_set(PointerRNA *ptr, PointerRNA value)
sc->newscene= value.data;
}
-static void rna_Screen_scene_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Screen_scene_update(bContext *C, PointerRNA *ptr)
{
bScreen *sc= (bScreen*)ptr->data;
/* exception: can't set screens inside of area/region handers */
if(sc->newscene) {
- WM_main_add_notifier(NC_SCENE|ND_SCENEBROWSE, sc->newscene);
+ WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, sc->newscene);
sc->newscene= NULL;
}
}
@@ -178,6 +178,7 @@ static void rna_def_screen(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Screen_scene_set", NULL);
RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen.");
+ RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, 0, "rna_Screen_scene_update");
prop= RNA_def_property(srna, "areas", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index d3e0d166755..6459e5d7c48 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -348,13 +348,13 @@ static void rna_Window_screen_set(PointerRNA *ptr, PointerRNA value)
win->newscreen= value.data;
}
-static void rna_Window_screen_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Window_screen_update(bContext *C, PointerRNA *ptr)
{
wmWindow *win= (wmWindow*)ptr->data;
/* exception: can't set screens inside of area/region handers */
if(win->newscreen) {
- WM_main_add_notifier(NC_SCREEN|ND_SCREENBROWSE, win->newscreen);
+ WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, win->newscreen);
win->newscreen= NULL;
}
}
@@ -772,6 +772,7 @@ static void rna_def_window(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Screen", "Active screen showing in the window.");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Window_screen_set", NULL);
+ RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, 0, "rna_Window_screen_update");
}