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-08 20:23:48 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-08 20:23:48 +0300
commit07904712e8943b5845df9559093018c8473f72f3 (patch)
tree03cdc6ea24ac87a2ee2a3c1a7299874040675489 /source/blender/editors
parentee74e720a82b7a1fb5f732cd8ceacbb26fa7e0d3 (diff)
RNA:
* Property update functions no longer get context, instead they get only Main and Scene. The RNA api was intended to be as context-less as possible, since it doesn't really matter who is changing the property, everything that uses the property should be updated. * There's still one exception case that use it now, screen operations still depend on context too much. It also revealed a few places using context where they shouldn't. * Ideally Scene shouldn't be passed, but much of Blender still depends on it, should be dropped when we try to support multiple scene editing. Change was planned for a while, but need this now to be able to call update without a context pointer.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/ED_screen.h2
-rw-r--r--source/blender/editors/screen/screen_edit.c4
-rw-r--r--source/blender/editors/screen/screen_ops.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 46973e29d2a..89f032efc21 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -98,7 +98,7 @@ void ED_screen_delete_scene(struct bContext *C, struct Scene *scene);
void ED_screen_set_subwinactive(struct wmWindow *win, struct wmEvent *event);
void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen);
void ED_screen_animation_timer(struct bContext *C, int redraws, int sync, int enable);
-void ED_screen_animation_timer_update(struct bContext *C, int redraws);
+void ED_screen_animation_timer_update(struct bScreen *screen, int redraws);
int ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type);
void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa);
void ED_screen_full_restore(struct bContext *C, ScrArea *sa);
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 6504ea4c2d5..024e00fa617 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1632,10 +1632,8 @@ static ARegion *time_top_left_3dwindow(bScreen *screen)
return aret;
}
-void ED_screen_animation_timer_update(bContext *C, int redraws)
+void ED_screen_animation_timer_update(bScreen *screen, int redraws)
{
- bScreen *screen= CTX_wm_screen(C);
-
if(screen && screen->animtimer) {
wmTimer *wt= screen->animtimer;
ScreenAnimData *sad= wt->customdata;
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index b108e1bbd41..87716190994 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2418,7 +2418,7 @@ static int screen_animation_play(bContext *C, wmOperator *op, wmEvent *event)
ED_screen_animation_timer(C, stime->redraws, sync, mode);
/* update region if TIME_REGION was set, to leftmost 3d window */
- ED_screen_animation_timer_update(C, stime->redraws);
+ ED_screen_animation_timer_update(screen, stime->redraws);
}
else {
int redraws = TIME_REGION|TIME_ALL_3D_WIN;