diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-03-27 13:39:09 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-03-27 13:39:09 +0300 |
commit | 34c92848a77f75ec678b18ea2b203f05c828afdb (patch) | |
tree | e3d4cbadb140cb0664b0cae697c3d76f6a19a33a /release | |
parent | e7afba4b293a4e83b62b652f6dc3c16e11c15b06 (diff) |
Use preview option to detect frame range for filename when using ctrl
F11.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/screen_play_rendered_anim.py | 12 |
1 files changed, 11 insertions, 1 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 3a7a9b99cde..5fe74eec709 100644 --- a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py +++ b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py @@ -107,11 +107,21 @@ class PlayRenderedAnim(Operator): del file_a, file_b, frame_tmp file = bpy.path.abspath(file) # expand '//' else: + path_valid = True # works for movies and images - file = rd.frame_path(frame=scene.frame_start) + file = rd.frame_path(frame=scene.frame_start, preview=scene.use_preview_range) file = bpy.path.abspath(file) # expand '//' if not os.path.exists(file): self.report({'WARNING'}, "File %r not found" % file) + path_valid = False + + #one last try for full range if we used preview range + if scene.use_preview_range and not path_valid: + file = rd.frame_path(frame=scene.frame_start, preview=False) + file = bpy.path.abspath(file) # expand '//' + if not os.path.exists(file): + self.report({'WARNING'}, "File %r not found" % file) + cmd = [player_path] # extra options, fps controls etc. |