From 191b15028077218527fc6f2fb7df3efab6e2aba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 3 Nov 2016 16:33:33 +0100 Subject: [PATCH] Removed redundant tempfile --- blender_cloud/attract/__init__.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/blender_cloud/attract/__init__.py b/blender_cloud/attract/__init__.py index d053146..a606aea 100644 --- a/blender_cloud/attract/__init__.py +++ b/blender_cloud/attract/__init__.py @@ -531,8 +531,6 @@ class ATTRACT_OT_make_shot_thumbnail(AttractOperatorMixin, stop_upon_exception = True async def async_execute(self, context): - import tempfile - # Later: for strip in context.selected_sequences: strip = active_strip(context) atc_object_id = getattr(strip, 'atc_object_id', None) @@ -541,11 +539,10 @@ class ATTRACT_OT_make_shot_thumbnail(AttractOperatorMixin, self.quit() return - with tempfile.NamedTemporaryFile() as tmpfile: - with thumbnail_render_settings(context): - bpy.ops.render.render() - file_id = await self.upload_via_tempdir(bpy.data.images['Render Result'], - 'attract_shot_thumbnail.jpg') + with thumbnail_render_settings(context): + bpy.ops.render.render() + file_id = await self.upload_via_tempdir(bpy.data.images['Render Result'], + 'attract_shot_thumbnail.jpg') if file_id is None: self.quit()