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')
-rw-r--r--source/blender/editors/util/ed_util.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 188d06cec55..30021d6a0c9 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -157,12 +157,11 @@ void ED_editors_init(bContext *C)
}
/* frees all editmode stuff */
-void ED_editors_exit(bContext *C)
+void ED_editors_exit(Main *bmain)
{
- Main *bmain = CTX_data_main(C);
-
- if (!bmain)
+ if (!bmain) {
return;
+ }
/* frees all editmode undos */
if (G_MAIN->wm.first) {
@@ -198,11 +197,10 @@ void ED_editors_exit(bContext *C)
/* flush any temp data from object editing to DNA before writing files,
* rendering, copying, etc. */
-bool ED_editors_flush_edits(const bContext *C, bool for_render)
+bool ED_editors_flush_edits(Main *bmain, bool for_render)
{
bool has_edited = false;
Object *ob;
- Main *bmain = CTX_data_main(C);
/* loop through all data to find edit mode or object mode, because during
* exiting we might not have a context for edit object and multiple sculpt
@@ -400,7 +398,8 @@ void ED_spacedata_id_remap(struct ScrArea *sa, struct SpaceLink *sl, ID *old_id,
static int ed_flush_edits_exec(bContext *C, wmOperator *UNUSED(op))
{
- ED_editors_flush_edits(C, false);
+ Main *bmain = CTX_data_main(C);
+ ED_editors_flush_edits(bmain, false);
return OPERATOR_FINISHED;
}