fix for own bug - evaluating past the last frame of a mask didnt work at all.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 8 Jun 2012 09:27:40 +0000 (09:27 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 8 Jun 2012 09:27:40 +0000 (09:27 +0000)
source/blender/blenkernel/intern/mask.c

index 66f10aca6526ca539cfa8fc3685f77e0e166bc1c..1f1dc6a0cc83c8f0c97a1385376642ab34c70026 100644 (file)
@@ -1779,10 +1779,17 @@ int BKE_mask_layer_shape_find_frame_range(MaskLayer *masklay, const int frame,
                }
        }
 
-       *r_masklay_shape_a = NULL;
-       *r_masklay_shape_b = NULL;
+       if ((masklay_shape = masklay->splines_shapes.last)) {
+               *r_masklay_shape_a = masklay_shape;
+               *r_masklay_shape_b = NULL;
+               return 1;
+       }
+       else {
+               *r_masklay_shape_a = NULL;
+               *r_masklay_shape_b = NULL;
 
-       return 0;
+               return 0;
+       }
 }
 
 MaskLayerShape *BKE_mask_layer_shape_varify_frame(MaskLayer *masklay, const int frame)