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_graph | |
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_graph')
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 59d7d7500ae..d208ead317b 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -181,14 +181,14 @@ static void graph_free(SpaceLink *sl) /* spacetype; init callback */ -static void graph_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa) +static void graph_init(struct wmWindowManager *wm, ScrArea *sa) { SpaceIpo *sipo = (SpaceIpo *)sa->spacedata.first; /* init dopesheet data if non-existent (i.e. for old files) */ if (sipo->ads == NULL) { sipo->ads = MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet"); - sipo->ads->source = (ID *)(G.main->scene.first); // FIXME: this is a really nasty hack here for now... + sipo->ads->source = (ID *)WM_window_get_active_scene(wm->winactive); } /* force immediate init of any invalid F-Curve colors */ |