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
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-12-19 14:58:42 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-19 14:58:42 +0300
commit61c218fe7d13c3e4746bd93c6faf16e4ac394182 (patch)
tree654c564dade14b6b1dd40cc4657296115d859dc6 /source/blender/editors/space_clip/clip_utils.c
parent883e342bdbded4dbeab182fb39deef89f1c48adc (diff)
Tracking: Add missing animation fix when deleting plane track
Diffstat (limited to 'source/blender/editors/space_clip/clip_utils.c')
-rw-r--r--source/blender/editors/space_clip/clip_utils.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c
index ba04fa82a73..e7853cb2a0c 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -196,7 +196,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, MovieTrackingTrack *track)
track,
rna_path, sizeof(rna_path));
BKE_animdata_fix_paths_remove(&clip->id, rna_path);
-
+ /* Delete track itself. */
BKE_tracking_track_free(track);
BLI_freelinkN(tracksbase, track);
/* Send notifiers. */
@@ -224,6 +224,28 @@ void clip_delete_marker(bContext *C, MovieClip *clip, MovieTrackingTrack *track,
}
}
+void clip_delete_plane_track(bContext *C,
+ MovieClip *clip,
+ MovieTrackingPlaneTrack *plane_track)
+{
+ MovieTracking *tracking = &clip->tracking;
+ ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(tracking);
+ /* Delete f-curves associated with the track (such as weight, i.e.) */
+ /* Escaped object name, escaped track name, rest of the path. */
+ char rna_path[MAX_NAME * 4 + 64];
+ BKE_tracking_get_rna_path_for_plane_track(tracking,
+ plane_track,
+ rna_path, sizeof(rna_path));
+ BKE_animdata_fix_paths_remove(&clip->id, rna_path);
+ /* Delete the plane track itself. */
+ BKE_tracking_plane_track_free(plane_track);
+ BLI_freelinkN(plane_tracks_base, plane_track);
+ /* TODO(sergey): Any notifiers to be sent here? */
+ (void) C;
+ /* Inform dependency graph. */
+ DAG_id_tag_update(&clip->id, 0);
+}
+
void clip_view_center_to_point(SpaceClip *sc, float x, float y)
{
int width, height;