mirror of
https://github.com/blender/blender
synced 2026-09-28 04:04:20 +03:00
Fix #146446: Move to layer doesn't append strokes to existing drawing
When autokey is off, operation is expected to append selected strokes to visible geometry, rather than inserting new frame. Now fixed with `ensure_active_keyframe`, keyframe is inserted in that function when autokey is on. When off, else block will append strokes to the visible drawing. Pull Request: https://projects.blender.org/blender/blender/pulls/149436
This commit is contained in:
parent
8747105632
commit
31c6dca04e
1 changed files with 5 additions and 2 deletions
|
|
@ -1934,9 +1934,12 @@ static wmOperatorStatus grease_pencil_move_to_layer_exec(bContext *C, wmOperator
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!layer_dst.frames().lookup_ptr(info.frame_number)) {
|
||||
bool is_key_inserted = false;
|
||||
const bool has_active_key = ensure_active_keyframe(
|
||||
*scene, grease_pencil, layer_dst, false, is_key_inserted);
|
||||
if (has_active_key && is_key_inserted) {
|
||||
/* Move geometry to a new drawing in target layer. */
|
||||
Drawing &drawing_dst = *grease_pencil.insert_frame(layer_dst, info.frame_number);
|
||||
Drawing &drawing_dst = *grease_pencil.get_drawing_at(layer_dst, info.frame_number);
|
||||
drawing_dst.strokes_for_write() = bke::curves_copy_curve_selection(
|
||||
curves_src, selected_strokes, {});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue