diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-08 20:27:53 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-08 20:27:53 +0400 |
commit | 895b99715bb33736b45016a83293f4f3db65f94e (patch) | |
tree | 336b9ce0d7ff08f4abfd1f46680d235a5cfefeee /source/blender | |
parent | 3675fab31d9e763069b01ba24fae1864583d8313 (diff) |
- Clip draw as scene strip background works fine again
- Path cleanup performed from curve view now clears only active track
instead of all selected tracks.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 30 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 18 |
3 files changed, 36 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 42722c7214c..4b2a2fef27f 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -2045,7 +2045,7 @@ static ImBuf * seq_render_scene_strip_impl( /* opengl offscreen render */ scene_update_for_newframe(context.bmain, scene, scene->lay); ibuf = sequencer_view3d_cb(scene, camera, context.rectx, context.recty, - IB_rect, context.scene->r.seq_prev_type, FALSE, err_out); + IB_rect, context.scene->r.seq_prev_type, TRUE, err_out); if(ibuf == NULL) { fprintf(stderr, "seq_render_scene_strip_impl failed to get opengl buffer: %s\n", err_out); } diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 3e0168fa071..24267df629a 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -411,14 +411,6 @@ static void clip_keymap(struct wmKeyConfig *keyconf) RNA_boolean_set(kmi->ptr, "backwards", TRUE); RNA_boolean_set(kmi->ptr, "sequence", TRUE); - /* clean-up */ - kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0); - RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_REMAINED); - kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0); - RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_UPTO); - kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0); - RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_ALL); - /* mode */ kmi= WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "mode", SC_MODE_RECONSTRUCTION); @@ -546,6 +538,17 @@ static void clip_keymap(struct wmKeyConfig *keyconf) transform_keymap_for_space(keyconf, keymap, SPACE_CLIP); + /* clean-up */ + kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0); + RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_REMAINED); + RNA_boolean_set(kmi->ptr, "clear_active", FALSE); + kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0); + RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_UPTO); + RNA_boolean_set(kmi->ptr, "clear_active", FALSE); + kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0); + RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_ALL); + RNA_boolean_set(kmi->ptr, "clear_active", FALSE); + /* ******** Hotkeys avalaible for preview region only ******** */ keymap= WM_keymap_find(keyconf, "Clip Graph Editor", SPACE_CLIP, 0); @@ -575,6 +578,17 @@ static void clip_keymap(struct wmKeyConfig *keyconf) kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", LKEY, KM_PRESS, 0, 0); RNA_string_set(kmi->ptr, "data_path", "space_data.lock_time_cursor"); + /* clean-up */ + kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0); + RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_REMAINED); + RNA_boolean_set(kmi->ptr, "clear_active", TRUE); + kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0); + RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_UPTO); + RNA_boolean_set(kmi->ptr, "clear_active", TRUE); + kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0); + RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_ALL); + RNA_boolean_set(kmi->ptr, "clear_active", TRUE); + transform_keymap_for_space(keyconf, keymap, SPACE_CLIP); } diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 05a84f04cd4..a4592e9fc25 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -1824,13 +1824,20 @@ static int clear_track_path_exec(bContext *C, wmOperator *op) MovieTrackingTrack *track; ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); int action= RNA_enum_get(op->ptr, "action"); + int clear_active= RNA_boolean_get(op->ptr, "clear_active"); - track= tracksbase->first; - while(track) { - if(TRACK_VIEW_SELECTED(sc, track)) - BKE_tracking_clear_path(track, sc->user.framenr, action); + if (clear_active) { + track= BKE_tracking_active_track(&clip->tracking); + BKE_tracking_clear_path(track, sc->user.framenr, action); + } + else { + track= tracksbase->first; + while(track) { + if(TRACK_VIEW_SELECTED(sc, track)) + BKE_tracking_clear_path(track, sc->user.framenr, action); - track= track->next; + track= track->next; + } } WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip); @@ -1861,6 +1868,7 @@ void CLIP_OT_clear_track_path(wmOperatorType *ot) /* proeprties */ RNA_def_enum(ot->srna, "action", clear_path_actions, TRACK_CLEAR_REMAINED, "Action", "Clear action to execute"); + RNA_def_boolean(ot->srna, "clear_active", 0, "Clear Active", "Clear active track only instead of all selected tracks"); } /********************** disable markers operator *********************/ |