Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/util/ed_util.c')
-rw-r--r--source/blender/editors/util/ed_util.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index f727f48e993..0463980dacd 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -344,3 +344,23 @@ void ED_spacedata_id_unref(struct SpaceLink *sl, const ID *id)
break;
}
}
+
+static int ed_flush_edits_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ ED_editors_flush_edits(C, false);
+ return OPERATOR_FINISHED;
+}
+
+void ED_OT_flush_edits(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Flush Edits";
+ ot->description = "Flush edit data from active editing modes";
+ ot->idname = "ED_OT_flush_edits";
+
+ /* api callbacks */
+ ot->exec = ed_flush_edits_exec;
+
+ /* flags */
+ ot->flag = OPTYPE_INTERNAL;
+}