[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52602] trunk/blender/source/blender/ blenkernel/intern/mask.c: Masking: fixed bug with vector handles not updating when CV is parented to a motion track .

Sergey Sharybin sergey.vfx at gmail.com
Tue Nov 27 12:28:39 CET 2012


Revision: 52602
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52602
Author:   nazgul
Date:     2012-11-27 11:28:39 +0000 (Tue, 27 Nov 2012)
Log Message:
-----------
Masking: fixed bug with vector handles not updating when CV is parented to a motion track.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/mask.c

Modified: trunk/blender/source/blender/blenkernel/intern/mask.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/mask.c	2012-11-27 10:24:18 UTC (rev 52601)
+++ trunk/blender/source/blender/blenkernel/intern/mask.c	2012-11-27 11:28:39 UTC (rev 52602)
@@ -1416,7 +1416,7 @@
 
 		for (spline = masklay->splines.first; spline; spline = spline->next) {
 			int i;
-			int has_auto = FALSE;
+			int need_handle_recalc = FALSE;
 
 			BKE_mask_spline_ensure_deform(spline);
 
@@ -1436,16 +1436,16 @@
 					add_v2_v2(point_deform->bezt.vec[2], delta);
 				}
 
-				if (point->bezt.h1 == HD_AUTO) {
-					has_auto = TRUE;
+				if (ELEM(point->bezt.h1, HD_AUTO, HD_VECT)) {
+					need_handle_recalc = TRUE;
 				}
 			}
 
-			/* if the spline has auto handles, these need to be recalculated after deformation */
-			if (has_auto) {
+			/* if the spline has auto or vector handles, these need to be recalculated after deformation */
+			if (need_handle_recalc) {
 				for (i = 0; i < spline->tot_point; i++) {
 					MaskSplinePoint *point_deform = &spline->points_deform[i];
-					if (point_deform->bezt.h1 == HD_AUTO) {
+					if (ELEM(point_deform->bezt.h1, HD_AUTO, HD_VECT)) {
 						BKE_mask_calc_handle_point(spline, point_deform);
 					}
 				}




More information about the Bf-blender-cvs mailing list