diff options
-rw-r--r-- | source/blender/blenkernel/BKE_screen.h | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 17 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 39a90fe3074..bf01ef0ec60 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -41,6 +41,7 @@ struct Header; struct Menu; struct ScrArea; struct SpaceType; +struct Scene; struct wmNotifier; struct wmWindow; struct wmWindowManager; @@ -233,7 +234,7 @@ void BKE_screen_area_free(struct ScrArea *sa); /* screen */ void free_screen(struct bScreen *sc); -unsigned int BKE_screen_visible_layers(struct bScreen *screen); +unsigned int BKE_screen_visible_layers(struct bScreen *screen, struct Scene *scene); #endif diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 302b81f2a04..8535bfc6d0c 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2155,7 +2155,7 @@ static void dag_current_scene_layers(Main *bmain, Scene **sce, unsigned int *lay for(win=wm->windows.first; win; win=win->next) { if(win->screen) { if(!*sce) *sce= win->screen->scene; - *lay |= BKE_screen_visible_layers(win->screen); + *lay |= BKE_screen_visible_layers(win->screen, win->screen->scene); } } } diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 459db96dbfb..0dc6bf359f6 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -318,21 +318,20 @@ void free_screen(bScreen *sc) } /* for depsgraph */ -unsigned int BKE_screen_visible_layers(bScreen *screen) +unsigned int BKE_screen_visible_layers(bScreen *screen, Scene *scene) { ScrArea *sa; unsigned int layer= 0; - if(!screen) - return layer; - - /* get all used view3d layers */ - for(sa= screen->areabase.first; sa; sa= sa->next) - if(sa->spacetype==SPACE_VIEW3D) - layer |= ((View3D *)sa->spacedata.first)->lay; + if(screen) { + /* get all used view3d layers */ + for(sa= screen->areabase.first; sa; sa= sa->next) + if(sa->spacetype==SPACE_VIEW3D) + layer |= ((View3D *)sa->spacedata.first)->lay; + } if(!layer) - return screen->scene->lay; + return scene->lay; return layer; } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index c158901c15d..b0d1557a66f 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1614,13 +1614,13 @@ void ED_screen_animation_timer_update(bContext *C, int redraws) void ED_update_for_newframe(const bContext *C, int mute) { bScreen *screen= CTX_wm_screen(C); - Scene *scene= screen->scene; + Scene *scene= CTX_data_scene(C); //extern void audiostream_scrub(unsigned int frame); /* seqaudio.c */ /* this function applies the changes too */ /* XXX future: do all windows */ - scene_update_for_newframe(scene, BKE_screen_visible_layers(screen)); /* BKE_scene.h */ + scene_update_for_newframe(scene, BKE_screen_visible_layers(screen, scene)); /* BKE_scene.h */ //if ( (CFRA>1) && (!mute) && (scene->r.audio.flag & AUDIO_SCRUB)) // audiostream_scrub( CFRA ); |