diff options
Diffstat (limited to 'source/blender/editors/space_graph/space_graph.c')
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 883b476f372..3cc83b12124 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -110,6 +110,10 @@ static SpaceLink *graph_new(const bContext *C) sipo->ads= MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet"); sipo->ads->source= (ID *)scene; + /* settings for making it easier by default to just see what you're interested in tweaking */ + sipo->ads->filterflag |= ADS_FILTER_ONLYSEL; + sipo->flag |= SIPO_SELVHANDLESONLY; + /* header */ ar= MEM_callocN(sizeof(ARegion), "header for graphedit"); @@ -186,7 +190,7 @@ static void graph_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa) 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... } - + ED_area_tag_refresh(sa); } @@ -464,6 +468,13 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) break; } break; + case NC_NODE: + if (wmn->action == NA_SELECTED) { + /* selection changed, so force refresh to flush (needs flag set to do syncing) */ + sipo->flag |= SIPO_TEMP_NEEDCHANSYNC; + ED_area_tag_refresh(sa); + } + break; case NC_SPACE: if(wmn->data == ND_SPACE_GRAPH) ED_area_tag_redraw(sa); @@ -513,14 +524,15 @@ static void graph_refresh(const bContext *C, ScrArea *sa) if (ANIM_animdata_get_context(C, &ac)) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; + size_t items; int filter; - int items, i; + int i; /* build list of F-Curves which will be visible as channels in channel-region * - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a * mismatch between channel-colors and the drawn curves */ - filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CURVESONLY|ANIMFILTER_NODUPLIS); + filter= (ANIMFILTER_DATA_VISIBLE|ANIMFILTER_NODUPLIS); items= ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); /* loop over F-Curves, assigning colors */ |