diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 6 |
5 files changed, 17 insertions, 7 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 666ba003948..49a3d84813c 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2095,6 +2095,12 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) /* init binarytree-list for getting keyframes */ BLI_dlrbTree_init(&keys); + /* seed up dummy dopesheet context with flags to perform necessary filtering */ + if ((scene->flag & SCE_KEYS_NO_SELONLY) == 0) { + /* only selected channels are included */ + ads.filterflag |= ADS_FILTER_ONLYSEL; + } + /* populate tree with keyframe nodes */ scene_to_keylist(&ads, scene, &keys, NULL); diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index 51d9840a079..04c1225afb6 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -341,7 +341,7 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); View2D *v2d = &ar->v2d; - short onlysel = (stime->flag & TIME_ONLYACTSEL); + bool onlysel = ((scene->flag & SCE_KEYS_NO_SELONLY) == 0); /* draw scene keyframes first * - don't try to do this when only drawing active/selected data keyframes, diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index e36ce7d9657..2e6ef7af6ff 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1245,6 +1245,8 @@ typedef struct Scene { /* use preview range */ #define SCER_PRV_RANGE (1<<0) #define SCER_LOCK_FRAME_SELECTION (1<<1) + /* timeline/keyframe jumping - only selected items (on by default) */ +#define SCE_KEYS_NO_SELONLY (1<<2) /* mode (int now) */ #define R_OSA 0x0001 diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 5df4b030c4a..7ea719c7eb3 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -5247,6 +5247,14 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Preview Range End Frame", "Alternative end frame for UI playback"); RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL); + /* Timeline / Time Navigation settings */ + prop = RNA_def_property(srna, "show_keys_from_selected_only", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SCE_KEYS_NO_SELONLY); + RNA_def_property_ui_text(prop, "Only Keyframes from Selected Channels", + "Consider keyframes for active Object and/or its selected bones only " + "(in timeline and when jumping between keyframes)"); + RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL); + /* Stamp */ prop = RNA_def_property(srna, "use_stamp_note", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata"); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index fb457182852..85d0344e087 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2941,12 +2941,6 @@ static void rna_def_space_time(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Space Timeline Editor", "Timeline editor space data"); /* view settings */ - prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_ONLYACTSEL); - RNA_def_property_ui_text(prop, "Only Selected Channels", - "Show keyframes for active Object and/or its selected bones only"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL); - prop = RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_CFRA_NUM); RNA_def_property_ui_text(prop, "Show Frame Number Indicator", |