diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-16 17:45:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-16 17:45:27 +0300 |
commit | cf3d6d63eef11f33ce545ca6f95476c9b8e6db4d (patch) | |
tree | 334cd84c3a05aed3b088895ee86dbdfea4e28959 /release | |
parent | 1e245cc58928ad40c9e665f3aede685a9485ea21 (diff) |
bugfix [#24462] UV Layouts saved as PNG results in two files (rename bug)
renaming failed in some cases, now we can just render to a file.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/op/uv.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/release/scripts/op/uv.py b/release/scripts/op/uv.py index baac3a279e9..7e903c04421 100644 --- a/release/scripts/op/uv.py +++ b/release/scripts/op/uv.py @@ -214,13 +214,8 @@ def write_png(fw, mesh_source, image_width, image_height, face_iter): scene.render.filepath = filepath data_context = {"blend_data": bpy.context.blend_data, "scene": scene} - bpy.ops.render.render(data_context, animation=True) - - # stupid - import os - animpath = scene.render.frame_path(1) - os.rename(animpath, os.path.abspath(filepath)) - + bpy.ops.render.render(data_context, write_still=True) + # cleanup bpy.data.scenes.remove(scene) bpy.data.objects.remove(obj_cam) |