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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'io_mesh_uv_layout/export_uv_png.py')
-rw-r--r--io_mesh_uv_layout/export_uv_png.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/io_mesh_uv_layout/export_uv_png.py b/io_mesh_uv_layout/export_uv_png.py
index 5da543cc..c5ba3a3b 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, mesh_source, image_width, image_height, opacity, face_iter_func):
+def write(fw, context, mesh_source, image_width, image_height, opacity, face_iter_func):
filepath = fw.__self__.name
fw.__self__.close()
@@ -133,7 +133,8 @@ def write(fw, mesh_source, image_width, image_height, opacity, face_iter_func):
scene.update()
- data_context = {"blend_data": bpy.context.blend_data, "scene": scene}
+ data_context = context.copy()
+ data_context.update((("blend_data", bpy.context.blend_data), ("scene", scene)))
bpy.ops.render.render(data_context, write_still=True)
# cleanup