diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2022-07-26 00:43:48 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2022-07-26 00:43:48 +0300 |
commit | f081e76037432cb926be45e980eac201d337032c (patch) | |
tree | dd1225521c12ea21c0b0c3d51ec1ae3f8730755f /source/blender/editors/space_graph/graph_ops.c | |
parent | fa2084ae58a77b1201289b6bedac427f73c762d1 (diff) | |
parent | 462f99bf38648a08226b1fba423315aec2bc577b (diff) |
Merge branch 'master' into geometry-nodes-iterative-cachegeometry-nodes-rigid-body-integration
Diffstat (limited to 'source/blender/editors/space_graph/graph_ops.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_ops.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 128925d4591..8deea21318c 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -72,21 +72,21 @@ static void graphview_cursor_apply(bContext *C, wmOperator *op) * NOTE: sync this part of the code with ANIM_OT_change_frame */ /* 1) frame is rounded to the nearest int, since frames are ints */ - CFRA = round_fl_to_int(frame); + scene->r.cfra = round_fl_to_int(frame); if (scene->r.flag & SCER_LOCK_FRAME_SELECTION) { /* Clip to preview range * NOTE: Preview range won't go into negative values, * so only clamping once should be fine. */ - CLAMP(CFRA, PSFRA, PEFRA); + CLAMP(scene->r.cfra, PSFRA, PEFRA); } else { /* Prevent negative frames */ - FRAMENUMBER_MIN_CLAMP(CFRA); + FRAMENUMBER_MIN_CLAMP(scene->r.cfra); } - SUBFRA = 0.0f; + scene->r.subframe = 0.0f; DEG_id_tag_update(&scene->id, ID_RECALC_FRAME_CHANGE); } @@ -234,14 +234,16 @@ static int graphview_curves_hide_exec(bContext *C, wmOperator *op) /* get list of all channels that selection may need to be flushed to * - hierarchy must not affect what we have access to here... */ - filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS); + filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FCURVESONLY | ANIMFILTER_LIST_CHANNELS | + ANIMFILTER_NODUPLIS); ANIM_animdata_filter(&ac, &all_data, filter, ac.data, ac.datatype); /* filter data * - of the remaining visible curves, we want to hide the ones that are * selected/unselected (depending on "unselected" prop) */ - filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS); + filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FCURVESONLY | ANIMFILTER_CURVE_VISIBLE | + ANIMFILTER_NODUPLIS); if (unselected) { filter |= ANIMFILTER_UNSEL; } @@ -275,7 +277,8 @@ static int graphview_curves_hide_exec(bContext *C, wmOperator *op) /* unhide selected */ if (unselected) { /* turn off requirement for visible */ - filter = ANIMFILTER_SEL | ANIMFILTER_NODUPLIS | ANIMFILTER_LIST_CHANNELS; + filter = ANIMFILTER_SEL | ANIMFILTER_NODUPLIS | ANIMFILTER_LIST_CHANNELS | + ANIMFILTER_FCURVESONLY; /* flushing has been done */ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); @@ -344,13 +347,15 @@ static int graphview_curves_reveal_exec(bContext *C, wmOperator *op) /* get list of all channels that selection may need to be flushed to * - hierarchy must not affect what we have access to here... */ - filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS); + filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS | + ANIMFILTER_FCURVESONLY); ANIM_animdata_filter(&ac, &all_data, filter, ac.data, ac.datatype); /* filter data * - just go through all visible channels, ensuring that everything is set to be curve-visible */ - filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_NODUPLIS); + filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_NODUPLIS | + ANIMFILTER_FCURVESONLY); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); for (ale = anim_data.first; ale; ale = ale->next) { |