Fix T41961: Crash by Copy n Paste splines to new mask without layer

It makes much more sense to ensure layer before pasteing, makes roto
as easy as it has never been before!
This commit is contained in:
Sergey Sharybin
2014-09-26 14:37:30 +06:00
parent 58a9569628
commit dcc281b74a

View File

@@ -2331,6 +2331,10 @@ static int paste_splines_exec(bContext *C, wmOperator *UNUSED(op))
Mask *mask = CTX_data_edit_mask(C);
MaskLayer *mask_layer = BKE_mask_layer_active(mask);
if (mask_layer == NULL) {
mask_layer = BKE_mask_layer_new(mask, "");
}
BKE_mask_clipboard_paste_to_layer(CTX_data_main(C), mask_layer);
/* TODO: only update edited splines */