Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-09-26 12:49:06 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-10-03 17:09:25 +0400
commit8862f68f03303ff7abb9cad2d87749fbcb36f611 (patch)
tree4a82a75548a47a811baebb94c45fd1a109f1b486 /source
parent14a5a69dd6956b25ca1bb52ad30852fecff91a6e (diff)
Tracking: Some minor improvements to copy-paste
- Deselect all existing tracks when pasteing, makes it easier to tweak stuff after the paste. - Make first of the pasted tracks active.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/tracking.c3
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index b77cd744a18..d85b6cc3d9e 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -371,6 +371,9 @@ void BKE_tracking_clipboard_paste_tracks(MovieTracking *tracking, MovieTrackingO
while (track) {
MovieTrackingTrack *new_track = BKE_tracking_track_duplicate(track);
+ if (track->prev == NULL) {
+ tracking->act_track = new_track;
+ }
BLI_addtail(tracksbase, new_track);
BKE_tracking_track_unique_name(tracksbase, new_track);
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index abbffcd8546..fb6b1a0033c 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -3811,7 +3811,9 @@ static int paste_tracks_exec(bContext *C, wmOperator *UNUSED(op))
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
MovieTrackingObject *object = BKE_tracking_object_get_active(tracking);
+ ListBase *tracks_base = BKE_tracking_object_get_tracks(tracking, object);
+ BKE_tracking_tracks_deselect_all(tracks_base);
BKE_tracking_clipboard_paste_tracks(tracking, object);
WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);