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>2013-01-07 15:28:20 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-01-07 15:28:20 +0400
commit13c1478c5d6abb3cee87d4e4163958c58657c0b8 (patch)
tree62fa377f0530d3e675dd8892cf3244eefd0328c5 /source/blender/makesrna/intern/rna_tracking.c
parent2edf2943b0f52b9e3cc8cb6eb1f1649fa05cfdb3 (diff)
Track.insert_frame used to create markers with zero pattern size
In most cases it's harmles since this call was intended to be used for importers only where pattern size was overriding after creation anyway. But better don't allow things which will work unpredictable.
Diffstat (limited to 'source/blender/makesrna/intern/rna_tracking.c')
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index 7cc57947671..31c50fb6b05 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -475,6 +475,14 @@ static MovieTrackingMarker *rna_trackingMarkers_insert_frame(MovieTrackingTrack
marker.framenr = framenr;
copy_v2_v2(marker.pos, co);
+ /* a bit arbitrary, but better than creating markers with zero pattern
+ * which is forbidden actually
+ */
+ copy_v2_v2(marker.pattern_corners[0], track->markers[0].pattern_corners[0]);
+ copy_v2_v2(marker.pattern_corners[1], track->markers[0].pattern_corners[1]);
+ copy_v2_v2(marker.pattern_corners[2], track->markers[0].pattern_corners[2]);
+ copy_v2_v2(marker.pattern_corners[3], track->markers[0].pattern_corners[3]);
+
new_marker = BKE_tracking_marker_insert(track, &marker);
WM_main_add_notifier(NC_MOVIECLIP | NA_EDITED, NULL);