Project Pampa fix: animplayer will use preview range if preview is enabled
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 29 Oct 2013 15:49:01 +0000 (15:49 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 29 Oct 2013 15:49:01 +0000 (15:49 +0000)
release/scripts/startup/bl_operators/screen_play_rendered_anim.py

index 6d1f35fe9375bc725df5f57c002ef3d1c43c1c32..04c28500089b4e75be4e39dc67ce864f96162286 100644 (file)
@@ -115,11 +115,17 @@ class PlayRenderedAnim(Operator):
 
         cmd = [player_path]
         # extra options, fps controls etc.
+        if scene.use_preview_range:
+            frame_start = scene.frame_preview_start
+            frame_end = scene.frame_preview_end
+        else:
+            frame_start = scene.frame_start
+            frame_end = scene.frame_end
         if preset in {'BLENDER24', 'INTERNAL'}:
             opts = ["-a",
                     "-f", str(rd.fps), str(rd.fps_base),
-                    "-s", str(scene.frame_start),
-                    "-e", str(scene.frame_end),
+                    "-s", str(frame_start),
+                    "-e", str(frame_end),
                     "-j", str(scene.frame_step),
                     file]
             cmd.extend(opts)