diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-06-21 05:41:39 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-06-21 05:41:39 +0400 |
commit | 3cad2a72b5d7e0dc18c56222a77fdf2d747f460c (patch) | |
tree | 3c2407aae4fa60583d70b12d16b401bc3f381d04 /source/blender/editors/space_graph | |
parent | 207911bdb3e5ba3e110cc7107186af988d2d10e8 (diff) |
Animation Channel Filtering Refactor - Part 1
* Removed list-expanders for Materials, Textures, and Particles. So
instead of:
Object
Materials
Material 1
... material 1 anim data ...
we now have
Object
Material 1
... material 1 anim data ...
This makes it faster+easier to get to these items. If you don't want
to see all of these, you can still use the data-block filters from the
header to hide these.
* Internal cleanup - removed "owner" and "ownertype" settings from
bAnimListElem. The purpose of these was muddled, and more of a hassle
to maintain than doing anything useful - it was only really used for
the stuff above.
* Removed need for "sa->spacedata.first" casts all over the show for
animation editor tools which needed access to editor data. This can
now be retrieved directly.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 0da03832d15..71c937b87cb 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -279,7 +279,7 @@ void GRAPH_OT_view_selected (wmOperatorType *ot) /* Bake each F-Curve into a set of samples, and store as a ghost curve */ static void create_ghost_curves (bAnimContext *ac, int start, int end) { - SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; + SpaceIpo *sipo= (SpaceIpo *)ac->sl; ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; int filter; @@ -399,7 +399,7 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)) /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) return OPERATOR_CANCELLED; - sipo= (SpaceIpo *)ac.sa->spacedata.first; + sipo= (SpaceIpo *)ac.sl; /* if no ghost curves, don't do anything */ if (sipo->ghostCurves.first == NULL) @@ -1725,7 +1725,7 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op)) /* set the new current frame and cursor values, based on the average time and value */ if (ked.i1) { - SpaceIpo *sipo= ac.sa->spacedata.first; + SpaceIpo *sipo= (SpaceIpo *)ac.sl; Scene *scene= ac.scene; /* take the average values, rounding to the nearest int for the current frame */ @@ -1792,7 +1792,7 @@ static void snap_graph_keys(bAnimContext *ac, short mode) ked.list.last= (ac->markers) ? ac->markers->last : NULL; } else if (mode == GRAPHKEYS_SNAP_VALUE) { - SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; + SpaceIpo *sipo= (SpaceIpo *)ac->sl; ked.f1= (sipo) ? sipo->cursorVal : 0.0f; } @@ -1906,7 +1906,7 @@ static void mirror_graph_keys(bAnimContext *ac, short mode) return; } else if (mode == GRAPHKEYS_MIRROR_VALUE) { - SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; + SpaceIpo *sipo= (SpaceIpo *)ac->sl; ked.f1= (sipo) ? sipo->cursorVal : 0.0f; } diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index cb799b85d3a..507ee43c6aa 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -90,7 +90,7 @@ static void deselect_graph_keys (bAnimContext *ac, short test, short sel) bAnimListElem *ale; int filter; - SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; + SpaceIpo *sipo= (SpaceIpo *)ac->sl; KeyframeEditData ked= {{NULL}}; KeyframeEditFunc test_cb, sel_cb; @@ -201,7 +201,7 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho bAnimListElem *ale; int filter; - SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; + SpaceIpo *sipo= (SpaceIpo *)ac->sl; KeyframeEditData ked; KeyframeEditFunc ok_cb, select_cb; View2D *v2d= &ac->ar->v2d; @@ -958,7 +958,7 @@ static void get_nearest_fcurve_verts_list (bAnimContext *ac, const int mval[2], bAnimListElem *ale; int filter; - SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; + SpaceIpo *sipo= (SpaceIpo *)ac->sl; View2D *v2d= &ac->ar->v2d; /* get curves to search through @@ -1091,7 +1091,7 @@ static tNearestVertInfo *find_nearest_fcurve_vert (bAnimContext *ac, const int m /* option 1) select keyframe directly under mouse */ static void mouse_graph_keys (bAnimContext *ac, const int mval[2], short select_mode, short curves_only) { - SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; + SpaceIpo *sipo= (SpaceIpo *)ac->sl; tNearestVertInfo *nvi; BezTriple *bezt= NULL; @@ -1218,7 +1218,7 @@ static void graphkeys_mselect_column (bAnimContext *ac, const int mval[2], short bAnimListElem *ale; int filter; - SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; + SpaceIpo *sipo= (SpaceIpo *)ac->sl; KeyframeEditFunc select_cb, ok_cb; KeyframeEditData ked; tNearestVertInfo *nvi; |