diff --git a/scripts/presets/keyconfig/keymap_data/blender_default.py b/scripts/presets/keyconfig/keymap_data/blender_default.py index f43808ccb68..65541bbec0c 100644 --- a/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -2330,8 +2330,7 @@ def km_file_browser(params): ("file.next", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True}, None), ("wm.context_toggle", {"type": 'H', "value": 'PRESS'}, {"properties": [("data_path", 'space_data.params.show_hidden')]}), - ("file.directory_new", {"type": 'I', "value": 'PRESS'}, - {"properties": [("confirm", False)]}), + ("file.directory_new", {"type": 'I', "value": 'PRESS'}, None), ("file.rename", {"type": 'F2', "value": 'PRESS'}, None), ("file.delete", {"type": 'X', "value": 'PRESS'}, None), ("file.delete", {"type": 'DEL', "value": 'PRESS'}, None), diff --git a/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py index 640c39ccdff..86e58da5dbf 100644 --- a/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -1240,8 +1240,7 @@ def km_file_browser(params): ("file.next", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True}, None), ("wm.context_toggle", {"type": 'H', "value": 'PRESS'}, {"properties": [("data_path", 'space_data.params.show_hidden')]}), - ("file.directory_new", {"type": 'I', "value": 'PRESS'}, - {"properties": [("confirm", False)]}), + ("file.directory_new", {"type": 'I', "value": 'PRESS'}, None), ("file.rename", {"type": 'F2', "value": 'PRESS'}, None), ("file.delete", {"type": 'DEL', "value": 'PRESS'}, None), ("file.smoothscroll", {"type": 'TIMER1', "value": 'ANY', "any": True}, None), diff --git a/source/blender/editors/armature/armature_relations.cc b/source/blender/editors/armature/armature_relations.cc index a09f3abae62..4b20f3b1497 100644 --- a/source/blender/editors/armature/armature_relations.cc +++ b/source/blender/editors/armature/armature_relations.cc @@ -774,20 +774,6 @@ static int separate_armature_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int separate_armature_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/) -{ - if (RNA_boolean_get(op->ptr, "confirm")) { - return WM_operator_confirm_ex(C, - op, - IFACE_("Move selected bones to a separate armature?"), - nullptr, - IFACE_("Separate"), - ALERT_ICON_NONE, - false); - } - return separate_armature_exec(C, op); -} - void ARMATURE_OT_separate(wmOperatorType *ot) { /* identifiers */ @@ -796,13 +782,11 @@ void ARMATURE_OT_separate(wmOperatorType *ot) ot->description = "Isolate selected bones into a separate armature"; /* callbacks */ - ot->invoke = separate_armature_invoke; ot->exec = separate_armature_exec; ot->poll = ED_operator_editarmature; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - WM_operator_properties_confirm_or_exec(ot); } /** \} */ diff --git a/source/blender/editors/curve/editcurve.cc b/source/blender/editors/curve/editcurve.cc index bf99048da28..eadcb337cfa 100644 --- a/source/blender/editors/curve/editcurve.cc +++ b/source/blender/editors/curve/editcurve.cc @@ -1455,20 +1455,6 @@ static int separate_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int separate_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/) -{ - if (RNA_boolean_get(op->ptr, "confirm")) { - return WM_operator_confirm_ex(C, - op, - IFACE_("Move selected points to a new object?"), - nullptr, - IFACE_("Separate"), - ALERT_ICON_NONE, - false); - } - return separate_exec(C, op); -} - void CURVE_OT_separate(wmOperatorType *ot) { /* identifiers */ @@ -1477,13 +1463,11 @@ void CURVE_OT_separate(wmOperatorType *ot) ot->description = "Separate selected points from connected unselected points into a new object"; /* api callbacks */ - ot->invoke = separate_invoke; ot->exec = separate_exec; ot->poll = ED_operator_editsurfcurve; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - WM_operator_properties_confirm_or_exec(ot); } /** \} */ diff --git a/source/blender/editors/object/object_relations.cc b/source/blender/editors/object/object_relations.cc index a386a036c7c..84a067b1f23 100644 --- a/source/blender/editors/object/object_relations.cc +++ b/source/blender/editors/object/object_relations.cc @@ -288,20 +288,6 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) #undef INDEX_UNSET } -static int vertex_parent_set_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/) -{ - if (RNA_boolean_get(op->ptr, "confirm")) { - return WM_operator_confirm_ex(C, - op, - IFACE_("Parent selected objects to the selected vertices?"), - nullptr, - IFACE_("Parent"), - ALERT_ICON_NONE, - false); - } - return vertex_parent_set_exec(C, op); -} - void OBJECT_OT_vertex_parent_set(wmOperatorType *ot) { /* identifiers */ @@ -310,13 +296,11 @@ void OBJECT_OT_vertex_parent_set(wmOperatorType *ot) ot->idname = "OBJECT_OT_vertex_parent_set"; /* api callbacks */ - ot->invoke = vertex_parent_set_invoke; ot->poll = vertex_parent_set_poll; ot->exec = vertex_parent_set_exec; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - WM_operator_properties_confirm_or_exec(ot); } /** \} */ @@ -1120,20 +1104,6 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int parent_noinv_set_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/) -{ - if (RNA_boolean_get(op->ptr, "confirm")) { - return WM_operator_confirm_ex(C, - op, - IFACE_("Make Parent without inverse correction?"), - nullptr, - IFACE_("Parent"), - ALERT_ICON_NONE, - false); - } - return parent_noinv_set_exec(C, op); -} - void OBJECT_OT_parent_no_inverse_set(wmOperatorType *ot) { /* identifiers */ @@ -1142,13 +1112,11 @@ void OBJECT_OT_parent_no_inverse_set(wmOperatorType *ot) ot->idname = "OBJECT_OT_parent_no_inverse_set"; /* api callbacks */ - ot->invoke = parent_noinv_set_invoke; ot->exec = parent_noinv_set_exec; ot->poll = ED_operator_object_active_editable; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - WM_operator_properties_confirm_or_exec(ot); RNA_def_boolean(ot->srna, "keep_transform", diff --git a/source/blender/editors/space_file/file_ops.cc b/source/blender/editors/space_file/file_ops.cc index 4d803e1fbf9..664ad0c7045 100644 --- a/source/blender/editors/space_file/file_ops.cc +++ b/source/blender/editors/space_file/file_ops.cc @@ -2698,15 +2698,6 @@ static int file_directory_new_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int file_directory_new_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/) -{ - if (RNA_boolean_get(op->ptr, "confirm")) { - return WM_operator_confirm_ex( - C, op, IFACE_("Create new directory?"), nullptr, IFACE_("Create"), ALERT_ICON_NONE, false); - } - return file_directory_new_exec(C, op); -} - void FILE_OT_directory_new(wmOperatorType *ot) { PropertyRNA *prop; @@ -2717,7 +2708,6 @@ void FILE_OT_directory_new(wmOperatorType *ot) ot->idname = "FILE_OT_directory_new"; /* api callbacks */ - ot->invoke = file_directory_new_invoke; ot->exec = file_directory_new_exec; /* File browsing only operator (not asset browsing). */ ot->poll = ED_operator_file_browsing_active; /* <- important, handler is on window level */ @@ -2727,7 +2717,6 @@ void FILE_OT_directory_new(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean(ot->srna, "open", false, "Open", "Open new directory"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - WM_operator_properties_confirm_or_exec(ot); } /** \} */