diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-11 17:45:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-11 17:45:58 +0400 |
commit | e0bada19f97a45a22df838f79a9089811bd6880d (patch) | |
tree | 9741885c8ebad132a604b30ad44813f6b981d052 /release | |
parent | d811c284f978e092b2dfce60177b5b208127aaca (diff) |
[#22496] OpenSuse 11.2 The problem with built-Povray
give a better error message when povray isnt found.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/io/engine_render_pov.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/release/scripts/io/engine_render_pov.py b/release/scripts/io/engine_render_pov.py index 12cb2f61df0..bf57d02391b 100644 --- a/release/scripts/io/engine_render_pov.py +++ b/release/scripts/io/engine_render_pov.py @@ -762,12 +762,22 @@ class PovrayRender(bpy.types.RenderEngine): if 1: # TODO, when povray isnt found this gives a cryptic error, would be nice to be able to detect if it exists - self._process = subprocess.Popen([pov_binary, self._temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE + try: + self._process = subprocess.Popen([pov_binary, self._temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE + except OSError: + # TODO, report api + print("POVRAY: could not execute povray, possibly povray isn't installed: '%s'" % pov_binary) + import traceback + traceback.print_exc() + print ("***-DONE-***") + return False + else: # This works too but means we have to wait until its done os.system('%s %s' % (pov_binary, self._temp_file_ini)) print ("***-DONE-***") + return True def _cleanup(self): for f in (self._temp_file_in, self._temp_file_ini, self._temp_file_out): @@ -783,7 +793,10 @@ class PovrayRender(bpy.types.RenderEngine): self.update_stats("", "POVRAY: Exporting data from Blender") self._export(scene) self.update_stats("", "POVRAY: Parsing File") - self._render() + + if not self._render(): + self.update_stats("", "POVRAY: Not found") + return r = scene.render |