diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-12-21 12:52:43 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-12-21 12:52:43 +0300 |
commit | 0fcfe8993e63d2490320cf90a0e2567588ea54f6 (patch) | |
tree | 3452135a0e8c45afa9a45f54bd4f969168e3d623 /source/blender/editors/space_graph | |
parent | 824b76332202c33da0a9ec6fe803e4eb752618d5 (diff) |
Animation Editors - Durian Request - Selection Syncing:
This commit brings back the functionality whereby the selection of F-Curves and/or relevant Group(s) is synced with the selection status of the corresponding bones when the bones are selected/deselected.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index c3f241ef300..8902f4df314 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -434,25 +434,34 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) /* context changes */ switch (wmn->category) { case NC_ANIMATION: + /* unlike for DopeSheet, we want refresh not redraw here, + * since F-Curve colors may need setting + */ ED_area_tag_refresh(sa); break; case NC_SCENE: - /*switch (wmn->data) { - case ND_OB_ACTIVE: + switch (wmn->data) { + case ND_OB_ACTIVE: /* selection changed, so force refresh to flush */ case ND_OB_SELECT: ED_area_tag_refresh(sa); break; - }*/ - ED_area_tag_refresh(sa); + + default: /* just redrawing the view will do */ + ED_area_tag_redraw(sa); + break; + } break; case NC_OBJECT: - /*switch (wmn->data) { - case ND_BONE_SELECT: + switch (wmn->data) { + case ND_BONE_SELECT: /* selection changed, so force refresh to flush */ case ND_BONE_ACTIVE: ED_area_tag_refresh(sa); break; - }*/ - ED_area_tag_refresh(sa); + + default: /* just redrawing the view will do */ + ED_area_tag_redraw(sa); + break; + } break; case NC_SPACE: if(wmn->data == ND_SPACE_GRAPH) @@ -489,6 +498,10 @@ static void graph_refresh(const bContext *C, ScrArea *sa) /* region updates? */ // XXX resizing y-extents of tot should go here? + /* update the state of the animchannels in response to changes from the data they represent */ + // TODO: check if we don't want this to happen + ANIM_sync_animchannels_to_data(C); + /* init/adjust F-Curve colors */ if (ANIM_animdata_get_context(C, &ac)) { ListBase anim_data = {NULL, NULL}; |