Skip to content
This repository has been archived by the owner on Jul 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #35 from DavidBluecame/render_tile_exception_message
Browse files Browse the repository at this point in the history
Add error message if exception during tile rendering
  • Loading branch information
DarkTide committed Nov 8, 2015
2 parents a168716 + a6875b4 commit 69a16f1
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions io/yaf_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import threading
import time
import yafrayinterface
import traceback
from yafaray import PLUGIN_PATH
from yafaray import YAF_ID_NAME
from .yaf_object import yafObject
Expand Down Expand Up @@ -368,11 +369,17 @@ def drawAreaCallback(*args):
if bpy.app.version < (2, 74, 4 ):
l.rect, l.passes[0].rect = tile
else:
l.passes[0].rect, l.passes[1].rect = tile
if self.is_preview:
l.passes[0].rect = tile[0]
else:
l.passes[0].rect, l.passes[1].rect = tile

self.end_result(res)

except:
pass
print("Exporter: Exception while rendering in drawAreaCallback function:")
traceback.print_exc()

self.end_result(res)

def flushCallback(*args):
w, h, tile = args
Expand All @@ -382,11 +389,16 @@ def flushCallback(*args):
if bpy.app.version < (2, 74, 4 ):
l.rect, l.passes[0].rect = tile
else:
l.passes[0].rect, l.passes[1].rect = tile
except BaseException as e:
pass
if self.is_preview:
l.passes[0].rect = tile[0]
else:
l.passes[0].rect, l.passes[1].rect = tile

self.end_result(res)
self.end_result(res)

except BaseException as e:
print("Exporter: Exception while rendering in flushCallback function:")
traceback.print_exc()

t = threading.Thread(
target=self.yi.render,
Expand Down

0 comments on commit 69a16f1

Please sign in to comment.