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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user