forked from bartvdbraak/blender
Fix T38669: Mask duplicate fails with multiple layers
Allow duplicating splines from inactive layers. This way it's more useful IMO than restricting duplication to an active layer. TODO: What should be a behavior for clipboard (currently it copies splines from an active layer only)?
This commit is contained in:
parent
1562fd99f1
commit
9c79fd1193
@ -1502,12 +1502,13 @@ static int mask_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
Mask *mask = CTX_data_edit_mask(C);
|
||||
MaskLayer *mask_layer = BKE_mask_layer_active(mask);
|
||||
MaskSpline *spline;
|
||||
MaskLayer *mask_layer;
|
||||
|
||||
if (mask_layer == NULL) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
for (mask_layer = mask->masklayers.first;
|
||||
mask_layer;
|
||||
mask_layer = mask_layer->next)
|
||||
{
|
||||
MaskSpline *spline;
|
||||
|
||||
for (spline = mask_layer->splines.last;
|
||||
spline;
|
||||
@ -1579,6 +1580,7 @@ static int mask_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
point++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: only update edited splines */
|
||||
BKE_mask_update_display(mask, CFRA);
|
||||
|
Loading…
Reference in New Issue
Block a user