From bfe6128748d7676db68c61a7a6926a52f579939a Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 15 Nov 2023 12:04:22 +0100 Subject: [PATCH] Fix #114891: bpy.ops.sequencer.split ignores passed frame Caused by 0e01667e25f6 . Above commit changed it so that operator properties (set from python) were ignored for `split_frame` & `split_channel` in case `use_cursor_position` is False. Should be the other way around. Pull Request: https://projects.blender.org/blender/blender/pulls/114905 --- source/blender/editors/space_sequencer/sequencer_edit.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_sequencer/sequencer_edit.cc b/source/blender/editors/space_sequencer/sequencer_edit.cc index 48ab11a97ee..bce839e64a5 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.cc +++ b/source/blender/editors/space_sequencer/sequencer_edit.cc @@ -1429,8 +1429,8 @@ static int sequencer_split_exec(bContext *C, wmOperator *op) const bool use_cursor_position = RNA_boolean_get(op->ptr, "use_cursor_position"); - const int split_frame = use_cursor_position ? RNA_int_get(op->ptr, "frame") : scene->r.cfra; - const int split_channel = use_cursor_position ? RNA_int_get(op->ptr, "channel") : 0; + const int split_frame = use_cursor_position ? scene->r.cfra : RNA_int_get(op->ptr, "frame"); + const int split_channel = use_cursor_position ? 0 : RNA_int_get(op->ptr, "channel"); const eSeqSplitMethod method = eSeqSplitMethod(RNA_enum_get(op->ptr, "type")); const int split_side = sequence_split_side_for_exec_get(op);