From 34ab90f546f097cada951b2c9ca22bf271996980 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 6 Apr 2018 12:07:27 +0200 Subject: Depsgraph: remove EvaluationContext, pass Depsgraph instead. The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152 --- source/blender/editors/io/io_collada.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source/blender/editors/io/io_collada.c') diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index 4d0d59ae42c..576b24ed4b4 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -59,8 +59,6 @@ #include "io_collada.h" -#include "DEG_depsgraph.h" - static int wm_collada_export_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { if (!RNA_struct_property_is_set(op->ptr, "filepath")) { @@ -83,7 +81,6 @@ static int wm_collada_export_invoke(bContext *C, wmOperator *op, const wmEvent * /* function used for WM_OT_save_mainfile too */ static int wm_collada_export_exec(bContext *C, wmOperator *op) { - EvaluationContext eval_ctx; char filepath[FILE_MAX]; int apply_modifiers; int export_mesh_type; @@ -113,8 +110,6 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) int export_count; - CTX_data_eval_ctx(C, &eval_ctx); - if (!RNA_struct_property_is_set(op->ptr, "filepath")) { BKE_report(op->reports, RPT_ERROR, "No filename given"); return OPERATOR_CANCELLED; @@ -173,7 +168,6 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) ED_object_editmode_load(CTX_data_edit_object(C)); Scene *scene = CTX_data_scene(C); - CTX_data_eval_ctx(C, &eval_ctx); ExportSettings export_settings; @@ -205,7 +199,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) if (export_settings.include_armatures) includeFilter |= OB_REL_MOD_ARMATURE; if (export_settings.include_children) includeFilter |= OB_REL_CHILDREN_RECURSIVE; - export_count = collada_export(&eval_ctx, + export_count = collada_export(CTX_data_depsgraph(C), scene, &export_settings ); -- cgit v1.2.3