From 30b619e76529a5ca99f96683f1b4a512d18cd519 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Oct 2015 09:10:07 +1100 Subject: Revert "Fix T46365: Export UV Layout to PNG not working (missing context messages part)." This reverts commit e1d8c70bbb5776041383335f986b28b33d18f8ff. Prefer not to have speculative fixes. The intention here is not to use the context at all, even if doing so fixes the crash - it may then fail silently by mixing data from different contexts, causing further complications which are much harder to debug. --- io_mesh_uv_layout/export_uv_png.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'io_mesh_uv_layout/export_uv_png.py') diff --git a/io_mesh_uv_layout/export_uv_png.py b/io_mesh_uv_layout/export_uv_png.py index c5ba3a3b..5da543cc 100644 --- a/io_mesh_uv_layout/export_uv_png.py +++ b/io_mesh_uv_layout/export_uv_png.py @@ -21,7 +21,7 @@ import bpy -def write(fw, context, mesh_source, image_width, image_height, opacity, face_iter_func): +def write(fw, mesh_source, image_width, image_height, opacity, face_iter_func): filepath = fw.__self__.name fw.__self__.close() @@ -133,8 +133,7 @@ def write(fw, context, mesh_source, image_width, image_height, opacity, face_ite scene.update() - data_context = context.copy() - data_context.update((("blend_data", bpy.context.blend_data), ("scene", scene))) + data_context = {"blend_data": bpy.context.blend_data, "scene": scene} bpy.ops.render.render(data_context, write_still=True) # cleanup -- cgit v1.2.3