[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12427] trunk/blender/source/blender/src/ editseq.c: - handle size on last commit was incorrect at times, intended
Campbell Barton
cbarton at metavr.com
Mon Oct 29 11:59:26 CET 2007
Revision: 12427
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12427
Author: campbellbarton
Date: 2007-10-29 11:59:26 +0100 (Mon, 29 Oct 2007)
Log Message:
-----------
- handle size on last commit was incorrect at times, intended
functionality now works
- sequencer transform markers now redraws other views
Modified Paths:
--------------
trunk/blender/source/blender/src/editseq.c
Modified: trunk/blender/source/blender/src/editseq.c
===================================================================
--- trunk/blender/source/blender/src/editseq.c 2007-10-29 10:48:50 UTC (rev 12426)
+++ trunk/blender/source/blender/src/editseq.c 2007-10-29 10:59:26 UTC (rev 12427)
@@ -425,14 +425,16 @@
handsize = seq->handsize;
displen = (float)abs(seq->startdisp - seq->enddisp);
- if (displen/pixelx > 10) { /* dont even try to grab the handles of small strips */
- CLAMP( handsize,
- 7*pixelx,
- /* Set the max value to handle to 1/3 of the total len when its less then 28.
- * This is important because otherwise selecting handles happens even when you click in the middle */
- (int) MIN2(28*3, ((float)displen) /3)*pixelx
- );
+ if (displen / pixelx > 16) { /* dont even try to grab the handles of small strips */
+ /* Set the max value to handle to 1/3 of the total len when its less then 28.
+ * This is important because otherwise selecting handles happens even when you click in the middle */
+ if ((displen/3) < 30*pixelx) {
+ handsize = displen/3;
+ } else {
+ CLAMP(handsize, 7*pixelx, 30*pixelx);
+ }
+
if( handsize+seq->startdisp >=x )
*hand= 1;
else if( -handsize+seq->enddisp <=x )
@@ -2745,7 +2747,7 @@
short mval[2], val, xo, yo, xn, yn;
char str[32];
char side= 'L'; /* for extend mode only - use to know which side to extend on */
-
+ char marker_moved=0; /* if we mvoed a marker, redraw all marker views */
/* used for extend in a number of places */
int cfra = CFRA;
@@ -3018,6 +3020,7 @@
for(a=0, marker= G.scene->markers.first; marker; marker= marker->next) {
if(marker->flag & SELECT) {
marker->frame= oldframe[a] + ix;
+ marker_moved=1;
a++;
}
}
@@ -3122,6 +3125,7 @@
if (marker->flag & SELECT) {
if(oldframe[a] != MAXFRAME+1) {
marker->frame= oldframe[a] + ix;
+ marker_moved=1;
}
a++;
}
@@ -3228,7 +3232,8 @@
a++;
}
}
- }
+ marker_moved = 0;
+ }
} else {
/* images, effects and overlap */
@@ -3268,7 +3273,10 @@
else if (mode=='e')
BIF_undo_push("Transform Extend, Sequencer");
- allqueue(REDRAWSEQ, 0);
+ if (marker_moved)
+ allqueue(REDRAWMARKER, 0);
+ else
+ allqueue(REDRAWSEQ, 0);
}
/* since grab can move markers, we must turn this off before adding a new sequence
More information about the Bf-blender-cvs
mailing list