diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-28 20:33:02 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-28 20:33:02 +0400 |
commit | 74e4ad20c9e8d19f85aaa2995652e3f65bdfc0c9 (patch) | |
tree | 7f20ead7facacb69f02ab9384bcd855598878133 /source/blender/editors/space_graph | |
parent | f4f3a9b08b04077e6e9272e4fdd4cd550b47be02 (diff) |
2.5: code cleanup, added CTX_wm_space_* for each space type,
instead of casting everywhere.
Diffstat (limited to 'source/blender/editors/space_graph')
4 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 0e48d56ac90..82babb70c53 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -242,7 +242,7 @@ static void driver_update_flags_cb (bContext *C, void *fcu_v, void *dummy_v) /* drivers panel poll */ static int graph_panel_drivers_poll(const bContext *C, PanelType *pt) { - SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C); + SpaceIpo *sipo= CTX_wm_space_graph(C); if(sipo->mode != SIPO_MODE_DRIVERS) return 0; diff --git a/source/blender/editors/space_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c index a0ac64e3672..1b8b579326f 100644 --- a/source/blender/editors/space_graph/graph_header.c +++ b/source/blender/editors/space_graph/graph_header.c @@ -69,7 +69,7 @@ static void graph_viewmenu(bContext *C, uiLayout *layout, void *arg_unused) { bScreen *sc= CTX_wm_screen(C); ScrArea *sa= CTX_wm_area(C); - SpaceIpo *sipo= (SpaceIpo*)CTX_wm_space_data(C); + SpaceIpo *sipo= CTX_wm_space_graph(C); PointerRNA spaceptr; /* retrieve state */ @@ -252,7 +252,7 @@ static void do_graph_buttons(bContext *C, void *arg, int event) void graph_header_buttons(const bContext *C, ARegion *ar) { ScrArea *sa= CTX_wm_area(C); - SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C); + SpaceIpo *sipo= CTX_wm_space_graph(C); uiBlock *block; int xco, yco= 3; diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 68f4db555f8..fc4c05915c9 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -68,7 +68,7 @@ static int view_toggle_handles_exec (bContext *C, wmOperator *op) { - SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C); + SpaceIpo *sipo= CTX_wm_space_graph(C); ARegion *ar= CTX_wm_region(C); if (sipo == NULL) diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index c36d790f0be..31daee2187e 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -217,7 +217,7 @@ static void graph_main_area_init(wmWindowManager *wm, ARegion *ar) static void graph_main_area_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ - SpaceIpo *sipo= (SpaceIpo*)CTX_wm_space_data(C); + SpaceIpo *sipo= CTX_wm_space_graph(C); bAnimContext ac; View2D *v2d= &ar->v2d; View2DGrid *grid; @@ -294,7 +294,7 @@ static void graph_channel_area_init(wmWindowManager *wm, ARegion *ar) static void graph_channel_area_draw(const bContext *C, ARegion *ar) { - SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C); + SpaceIpo *sipo= CTX_wm_space_graph(C); bAnimContext ac; View2D *v2d= &ar->v2d; View2DScrollers *scrollers; |