Masking: fixed bug with vector handles not updating when CV is parented to a motion track.
This commit is contained in:
@@ -1416,7 +1416,7 @@ void BKE_mask_layer_evaluate(MaskLayer *masklay, const float ctime, const int do
|
|||||||
|
|
||||||
for (spline = masklay->splines.first; spline; spline = spline->next) {
|
for (spline = masklay->splines.first; spline; spline = spline->next) {
|
||||||
int i;
|
int i;
|
||||||
int has_auto = FALSE;
|
int need_handle_recalc = FALSE;
|
||||||
|
|
||||||
BKE_mask_spline_ensure_deform(spline);
|
BKE_mask_spline_ensure_deform(spline);
|
||||||
|
|
||||||
@@ -1436,16 +1436,16 @@ void BKE_mask_layer_evaluate(MaskLayer *masklay, const float ctime, const int do
|
|||||||
add_v2_v2(point_deform->bezt.vec[2], delta);
|
add_v2_v2(point_deform->bezt.vec[2], delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (point->bezt.h1 == HD_AUTO) {
|
if (ELEM(point->bezt.h1, HD_AUTO, HD_VECT)) {
|
||||||
has_auto = TRUE;
|
need_handle_recalc = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if the spline has auto handles, these need to be recalculated after deformation */
|
/* if the spline has auto or vector handles, these need to be recalculated after deformation */
|
||||||
if (has_auto) {
|
if (need_handle_recalc) {
|
||||||
for (i = 0; i < spline->tot_point; i++) {
|
for (i = 0; i < spline->tot_point; i++) {
|
||||||
MaskSplinePoint *point_deform = &spline->points_deform[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);
|
BKE_mask_calc_handle_point(spline, point_deform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user