[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47175] branches/soc-2011-tomato/source/ blender: fix for parenting, offset isnt needed anymore

Campbell Barton ideasman42 at gmail.com
Tue May 29 15:18:11 CEST 2012


Revision: 47175
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47175
Author:   campbellbarton
Date:     2012-05-29 13:18:11 +0000 (Tue, 29 May 2012)
Log Message:
-----------
fix for parenting, offset isnt needed anymore

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_relationships.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c	2012-05-29 12:28:34 UTC (rev 47174)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c	2012-05-29 13:18:11 UTC (rev 47175)
@@ -877,7 +877,6 @@
 				if (track) {
 					MovieTrackingMarker *marker = BKE_tracking_get_marker(track, ctime);
 					BKE_mask_coord_from_movieclip(clip, &user, r_co, marker->pos);
-					add_v2_v2(r_co, parent->offset);
 
 					return TRUE;
 				}

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c	2012-05-29 12:28:34 UTC (rev 47174)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c	2012-05-29 13:18:11 UTC (rev 47175)
@@ -62,6 +62,7 @@
 	}
 }
 
+#if 0
 static void draw_spline_parents(MaskObject *UNUSED(maskobj), MaskSpline *spline)
 {
 	int i;
@@ -93,6 +94,7 @@
 
 	glDisable(GL_LINE_STIPPLE);
 }
+#endif
 
 /* return non-zero if spline is selected */
 static void draw_spline_points(MaskObject *maskobj, MaskSpline *spline)
@@ -272,7 +274,7 @@
 			/* draw curve itself first... */
 			draw_spline_curve(maskobj, spline);
 
-			draw_spline_parents(maskobj, spline);
+//			draw_spline_parents(maskobj, spline);
 
 			/* ...and then handles over the curve so they're nicely visible */
 			draw_spline_points(maskobj, spline);
@@ -283,7 +285,7 @@
 
 				spline->points_deform = NULL;
 				draw_spline_curve(maskobj, spline);
-				draw_spline_parents(maskobj, spline);
+//				draw_spline_parents(maskobj, spline);
 				draw_spline_points(maskobj, spline);
 				spline->points_deform = back;
 			}

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_relationships.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_relationships.c	2012-05-29 12:28:34 UTC (rev 47174)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_relationships.c	2012-05-29 13:18:11 UTC (rev 47175)
@@ -135,7 +135,6 @@
 
 				if (MASKPOINT_ISSEL(point)) {
 					BezTriple *bezt = &point->bezt;
-					float tvec[2];
 
 					point->parent.id_type = ID_MC;
 					point->parent.id = &clip->id;
@@ -144,13 +143,6 @@
 
 					point->parent.flag |= MASK_PARENT_ACTIVE;
 
-					sub_v2_v2v2(tvec, parmask_pos, bezt->vec[1]);
-
-					add_v2_v2(bezt->vec[0], tvec);
-					add_v2_v2(bezt->vec[1], tvec);
-					add_v2_v2(bezt->vec[2], tvec);
-
-					negate_v2_v2(point->parent.offset, tvec);
 					copy_v2_v2(point->parent.parent_orig, parmask_pos);
 				}
 			}

Modified: branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h
===================================================================
--- branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h	2012-05-29 12:28:34 UTC (rev 47174)
+++ branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h	2012-05-29 13:18:11 UTC (rev 47175)
@@ -57,8 +57,6 @@
 	                       * in case of parenting to movie tracking data contains name of object */
 	char sub_parent[64];  /* sub-entity of parent to which parenting happened
 	                       * in case of parenting to movie tracking data contains name of track */
-	float offset[2];      /* offset from parent position, so object/control point can be parented to a
-	                       * motion track and also be animated (see ZanQdo's request below)  */
 	float parent_orig[2]; /* track location at the moment of parenting */
 } MaskParent;
 




More information about the Bf-blender-cvs mailing list