[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38040] branches/soc-2011-salad: Merging r38038 through r38039 from soc-2011-tomato into soc-2011-salad

Sergey Sharybin g.ulairi at gmail.com
Sat Jul 2 18:07:35 CEST 2011


Revision: 38040
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38040
Author:   nazgul
Date:     2011-07-02 16:07:35 +0000 (Sat, 02 Jul 2011)
Log Message:
-----------
Merging r38038 through r38039 from soc-2011-tomato into soc-2011-salad

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38038
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38039

Modified Paths:
--------------
    branches/soc-2011-salad/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-salad/source/blender/editors/screen/screen_ops.c
    branches/soc-2011-salad/source/blender/editors/space_clip/clip_draw.c
    branches/soc-2011-salad/source/blender/makesdna/DNA_tracking_types.h

Property Changed:
----------------
    branches/soc-2011-salad/


Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-37529
/branches/soc-2011-pepper:36830-37151
/branches/soc-2011-tomato:36831-38037
/trunk/blender:36834-38036
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-37529
/branches/soc-2011-pepper:36830-37151
/branches/soc-2011-tomato:36831-38039
/trunk/blender:36834-38036

Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/tracking.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/tracking.c	2011-07-02 16:03:47 UTC (rev 38039)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/tracking.c	2011-07-02 16:07:35 UTC (rev 38040)
@@ -553,7 +553,7 @@
 				if(sel_type==MCLIP_SEL_TRACK && sel==cur)
 					replace_sel= 1;
 
-				track->flag= cur->flag | (track->flag&TRACK_PROCESSED);
+				track->flag= cur->flag;
 				track->pat_flag= cur->pat_flag;
 				track->search_flag= cur->search_flag;
 
@@ -635,6 +635,7 @@
 			double x1= pos[0], y1= pos[1];
 			double x2= x1, y2= y1;
 			int wndx, wndy;
+			MovieTrackingMarker marker_new;
 
 			wndx= (int)((track->pat_max[0]-track->pat_min[0])*ibuf->x)/2;
 			wndy= (int)((track->pat_max[1]-track->pat_min[1])*ibuf->y)/2;
@@ -642,8 +643,6 @@
 			if(libmv_regionTrackerTrack(context->region_tracker, patch, patch_new,
 						width, height, MAX2(wndx, wndy),
 						x1, y1, &x2, &y2)) {
-				MovieTrackingMarker marker_new;
-
 				memset(&marker_new, 0, sizeof(marker_new));
 				marker_new.pos[0]= (origin[0]+x2)/ibuf_new->x;
 				marker_new.pos[1]= (origin[1]+y2)/ibuf_new->y;
@@ -651,18 +650,22 @@
 				if(context->backwards) marker_new.framenr= curfra-1;
 				else marker_new.framenr= curfra+1;
 
-				track->flag|= TRACK_PROCESSED;
+				BKE_tracking_insert_marker(track, &marker_new);
 
+			} else {
+				marker_new= *marker;
+				marker_new.framenr++;
+				marker_new.flag|= MARKER_DISABLED;
+
 				BKE_tracking_insert_marker(track, &marker_new);
-
-				ok= 1;
 			}
 
+			ok= 1;
+
 			MEM_freeN(patch);
 			MEM_freeN(patch_new);
 #endif
-		} else
-			track->flag|= TRACK_PROCESSED;
+		}
 
 		track= track->next;
 	}

Modified: branches/soc-2011-salad/source/blender/editors/screen/screen_ops.c
===================================================================
--- branches/soc-2011-salad/source/blender/editors/screen/screen_ops.c	2011-07-02 16:03:47 UTC (rev 38039)
+++ branches/soc-2011-salad/source/blender/editors/screen/screen_ops.c	2011-07-02 16:07:35 UTC (rev 38040)
@@ -2778,6 +2778,15 @@
 		}
 	}
 	else if(regiontype==RGN_TYPE_UI) {
+		if(spacetype==SPACE_CLIP) {
+			/* Track Preview button is on Properties Editor in SpaceClip,
+			   and it's very common case when users want it be refreshing
+			   during playback, so asking people to enable special option
+			   for this is a bit ticky, so add exception here for refreshing
+			   Properties Editor for SpaceClip always */
+			return 1;
+		}
+
 		if(redraws & TIME_ALL_BUTS_WIN)
 			return 1;
 	}

Modified: branches/soc-2011-salad/source/blender/editors/space_clip/clip_draw.c
===================================================================
--- branches/soc-2011-salad/source/blender/editors/space_clip/clip_draw.c	2011-07-02 16:03:47 UTC (rev 38039)
+++ branches/soc-2011-salad/source/blender/editors/space_clip/clip_draw.c	2011-07-02 16:07:35 UTC (rev 38040)
@@ -175,12 +175,8 @@
 
 	BKE_movieclip_last_selection(clip, &sel_type, &sel);
 
-	/* non-tracked tracks shouldn't display path */
-	if((track->flag&TRACK_PROCESSED)==0)
-		return;
-
 	marker= BKE_tracking_get_marker(track, sc->user.framenr);
-	if(marker->flag&MARKER_DISABLED)
+	if(marker->framenr!=sc->user.framenr || marker->flag&MARKER_DISABLED)
 		return;
 
 	framenr= marker->framenr;
@@ -198,7 +194,8 @@
 
 			if(marker->framenr==sc->user.framenr)
 				curindex= a;
-		}
+		} else
+			break;
 
 		i--;
 	}
@@ -216,7 +213,8 @@
 				curindex= b;
 
 			copy_v2_v2(path[b++], marker->pos);
-		}
+		} else
+			break;
 
 		i++;
 	}

Modified: branches/soc-2011-salad/source/blender/makesdna/DNA_tracking_types.h
===================================================================
--- branches/soc-2011-salad/source/blender/makesdna/DNA_tracking_types.h	2011-07-02 16:03:47 UTC (rev 38039)
+++ branches/soc-2011-salad/source/blender/makesdna/DNA_tracking_types.h	2011-07-02 16:07:35 UTC (rev 38040)
@@ -109,7 +109,7 @@
 #define MARKER_DISABLED	1
 
 /* MovieTrackingTrack->flag */
-#define TRACK_PROCESSED	(1<<1)
+#define TRACK_UNUSED		(1<<1)
 #define TRACK_DISABLE_RED	(1<<2)
 #define TRACK_DISABLE_GREEN	(1<<3)
 #define TRACK_DISABLE_BLUE	(1<<4)




More information about the Bf-blender-cvs mailing list