Revision: 48547
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48547
Author:   nazgul
Date:     2012-07-03 15:46:23 +0000 (Tue, 03 Jul 2012)
Log Message:
-----------
Tomato: correction to mask cache so parenting should work fine now

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c    
2012-07-03 15:27:27 UTC (rev 48546)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c    
2012-07-03 15:46:23 UTC (rev 48547)
@@ -2143,7 +2143,19 @@
 
        for (spline = base->first; spline; spline = spline->next) {
                MaskSpline *spline_new = BKE_mask_spline_copy(spline);
+               int i;
 
+               if (spline->points_deform) {
+                       spline_new->points_deform = 
MEM_dupallocN(spline->points_deform);
+
+                       for (i = 0; i < spline->tot_point; i++) {
+                               MaskSplinePoint *point_deform = 
&spline_new->points_deform[i];
+
+                               if (point_deform->uw)
+                                       point_deform->uw = 
MEM_dupallocN(point_deform->uw);
+                       }
+               }
+
                BLI_addtail(base_new, spline_new);
        }
 }
@@ -2222,7 +2234,11 @@
                return FALSE;
        }
 
-       return mask_points_compare(spline_a->points, spline_b->points, 
spline_a->tot_point);
+       if (!mask_points_compare(spline_a->points, spline_b->points, 
spline_a->tot_point)) {
+               return FALSE;
+       }
+
+       return mask_points_compare(spline_a->points_deform, 
spline_b->points_deform, spline_a->tot_point);
 }
 
 static int mask_splines_compare(ListBase *base_a, ListBase *base_b)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to