diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-20 12:53:30 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-20 12:53:30 +0300 |
commit | 20788e174751797c8c3f225f63444939cb8c54bf (patch) | |
tree | ba4f8fdf3dba35e9dc2f6b048b49a2977c2894f3 /source/blender/editors/space_nla/space_nla.c | |
parent | edb80a801d5f174ba80edd06772e86aff92d3e4f (diff) |
Cleanup: moar G.main removal.
Nice trick from blender2.8, we now can get active scene from active
window of windowmanager!
Diffstat (limited to 'source/blender/editors/space_nla/space_nla.c')
-rw-r--r-- | source/blender/editors/space_nla/space_nla.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 639195c16ac..745cea37ea3 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -178,14 +178,14 @@ static void nla_free(SpaceLink *sl) /* spacetype; init callback */ -static void nla_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa) +static void nla_init(struct wmWindowManager *wm, ScrArea *sa) { SpaceNla *snla = (SpaceNla *)sa->spacedata.first; /* init dopesheet data if non-existent (i.e. for old files) */ if (snla->ads == NULL) { snla->ads = MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet"); - snla->ads->source = (ID *)G.main->scene.first; // XXX this is bad, but we need this to be set correct + snla->ads->source = (ID *)WM_window_get_active_scene(wm->winactive); } ED_area_tag_refresh(sa); |