diff options
author | Thomas Dinges <blender@dingto.org> | 2011-07-24 01:45:22 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2011-07-24 01:45:22 +0400 |
commit | 39edc5355893e7582cab8960feb7b70a0de0be31 (patch) | |
tree | 5bf6a80b7157f45c79fd4d9a11d65493feb2f1aa /release | |
parent | 742225d9b4c3888c1cfd155b575420abf0cf7869 (diff) |
2.5 External animation player:
* Fixed an error when "Custom" was used and the path was empty (variable reference before assignment)
* The Operator now raises an error if there is no path or the path given is not available.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/screen_play_rendered_anim.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py index 910ccf96c0e..8699862d24b 100644 --- a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py +++ b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py @@ -59,6 +59,9 @@ def guess_player_path(preset): elif preset == 'MPLAYER': player_path = "mplayer" + + else: + player_path = "" return player_path @@ -131,12 +134,14 @@ class PlayRenderedAnim(bpy.types.Operator): cmd.extend(opts) else: # 'CUSTOM' cmd.append(file) - - # launch it - try: - process = subprocess.Popen(cmd) - except: - pass - #raise OSError("Couldn't find an external animation player.") + + if (player_path == "") or (os.path.exists(player_path)==False): + self.report({'ERROR'}, "Couldn't find an external animation player") + else: + # launch it + try: + process = subprocess.Popen(cmd) + except: + pass return {'FINISHED'} |