From 5531697f6d4a27137dd91996ee80d452b7147a02 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 15 Oct 2020 18:12:03 +1100 Subject: Cleanup: remove duplicate context variable (__py_context) The context was stored both in __py_context & bpy_context_module. This avoids duplicate functions to update them too. --- source/blender/blenkernel/intern/blendfile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/blendfile.c') diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 9dabbb021b6..567773507cf 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -330,7 +330,9 @@ static void setup_app_data(bContext *C, #ifdef WITH_PYTHON /* let python know about new main */ - BPY_context_update(C); + if (CTX_py_init_get(C)) { + BPY_context_update(C); + } #endif /* FIXME: this version patching should really be part of the file-reading code, -- cgit v1.2.3