forked from bartvdbraak/blender
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.
This commit is contained in:
parent
742225d9b4
commit
39edc53558
@ -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'}
|
||||
|
Loading…
Reference in New Issue
Block a user