diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-08 16:52:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-08 16:52:38 +0300 |
commit | a868e8623ca7218dfa363962e178293f4a8f0690 (patch) | |
tree | 2c0e08b1b9b810b60c7b19d9dac4fd6e2fb41c36 /release/scripts/op | |
parent | 7079047538da71961102478a23cccdbd62c7cf9d (diff) |
- RNA support for returning copied strings from functions, flagging strings as PROP_THICK_WRAP does this.
- scene.render_data.frame_path(frame=num), returns the output path for rending images of video.
- scene.render_data.file_extension, readonly attribute, gives the extension ".jpg", ".mov" etc
- player support was guessing names, use the above functions to get the actual names used, accounting for #'s replacing numbers.
Diffstat (limited to 'release/scripts/op')
-rw-r--r-- | release/scripts/op/screen_play_rendered_anim.py | 50 |
1 files changed, 7 insertions, 43 deletions
diff --git a/release/scripts/op/screen_play_rendered_anim.py b/release/scripts/op/screen_play_rendered_anim.py index a8c97010cce..b52bdf46ebd 100644 --- a/release/scripts/op/screen_play_rendered_anim.py +++ b/release/scripts/op/screen_play_rendered_anim.py @@ -29,39 +29,6 @@ import subprocess import os import platform -# from BKE_add_image_extension() -img_format_exts = { - 'IRIS': '.rgb', - 'RADHDR': '.hdr', - 'PNG': 'png', - 'TARGA': 'tga', - 'RAWTARGA': 'tga', - 'BMP': 'bmp', - 'TIFF': 'tif', - 'OPENEXR': 'exr', - 'MULTILAYER': 'exr', - 'CINEON': 'cin', - 'DPX': 'dpx', - 'JPEG': 'jpg', - 'JPEG2000': 'jp2', - 'QUICKTIME_QTKIT': 'mov', - 'QUICKTIME_CARBON': 'mov', - 'AVIRAW': 'avi', - 'AVIJPEG': 'avi', - 'AVICODEC': 'avi', - 'XVID': 'avi', - 'THEORA': 'ogg', - } - -movie_formats = ('QUICKTIME_QTKIT', - 'QUICKTIME_CARBONTKIT', - 'AVIRAW', - 'AVIJPEG', - 'AVICODEC', - 'XVID', - 'THEORA') - - def guess_player_path(preset): if preset == 'BLENDER24': player_path = 'blender' @@ -112,16 +79,13 @@ class PlayRenderedAnim(bpy.types.Operator): if player_path == '': player_path = guess_player_path(preset) - # doesn't support ### frame notation yet - if rd.file_format in movie_formats: - file = "%s%04d_%04d" % (file_path, sce.start_frame, sce.end_frame) - elif preset in ('BLENDER24', 'DJV', 'CUSTOM'): - file = "%s%04d" % (file_path, sce.start_frame) - elif preset in ('FRAMECYCLER', 'RV'): - file = "%s#" % file_path - - if rd.file_extensions: - file += '.' + img_format_exts[rd.file_format] + if preset in ('FRAMECYCLER', 'RV'): + # replace the number with '#' + file_a, file_b = rd.frame_path(frame=0), rd.frame_path(frame=1) + file = ''.join([(c if file_b[i] == c else "#") for i, c in enumerate(file_a)]) + else: + # works for movies and images + file = rd.frame_path(frame=sce.start_frame) cmd = [player_path] # extra options, fps controls etc. |