[Bf-extensions-cvs] [4c142e5] master: Fix T45746: PNG UV layout export is blank with new depsgraph.
Bastien Montagne
noreply at git.blender.org
Wed Aug 12 15:35:27 CEST 2015
Commit: 4c142e59206b8c751c3b80e3632b6c82476a26b3
Author: Bastien Montagne
Date: Wed Aug 12 15:34:39 2015 +0200
Branches: master
https://developer.blender.org/rBA4c142e59206b8c751c3b80e3632b6c82476a26b3
Fix T45746: PNG UV layout export is blank with new depsgraph.
Looks like we need an explicit Scene.update() call here...
===================================================================
M io_mesh_uv_layout/__init__.py
M io_mesh_uv_layout/export_uv_png.py
===================================================================
diff --git a/io_mesh_uv_layout/__init__.py b/io_mesh_uv_layout/__init__.py
index d8d08cd..30dff94 100644
--- a/io_mesh_uv_layout/__init__.py
+++ b/io_mesh_uv_layout/__init__.py
@@ -21,13 +21,12 @@
bl_info = {
"name": "UV Layout",
"author": "Campbell Barton, Matt Ebb",
- "version": (1, 1),
- "blender": (2, 62, 0),
+ "version": (1, 1, 1),
+ "blender": (2, 75, 0),
"location": "Image-Window > UVs > Export UV Layout",
"description": "Export the UV layout as a 2D graphic",
"warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
- "Scripts/Import-Export/UV_Layout",
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/UV_Layout",
"support": 'OFFICIAL',
"category": "Import-Export",
}
diff --git a/io_mesh_uv_layout/export_uv_png.py b/io_mesh_uv_layout/export_uv_png.py
index 1168e33..5da543c 100644
--- a/io_mesh_uv_layout/export_uv_png.py
+++ b/io_mesh_uv_layout/export_uv_png.py
@@ -131,6 +131,8 @@ def write(fw, mesh_source, image_width, image_height, opacity, face_iter_func):
scene.render.image_settings.file_format = 'PNG'
scene.render.filepath = filepath
+ scene.update()
+
data_context = {"blend_data": bpy.context.blend_data, "scene": scene}
bpy.ops.render.render(data_context, write_still=True)
More information about the Bf-extensions-cvs
mailing list