I've looked around online for this but it seems every source I find is dancing around the issue. I've created a build script so far that looks like this

  blender oop-blender-demo.blend -P model.py -- $1
  blender oop-blender-demo.blend -a

I want to add one more line that allows me to actually view the rendered animation like you can do in the blender app by going to Render --> Play Rendered Animation

Is there anyway to succinctly do this?


Call the operator

To Play Rendered Animation you call the operator. For example sake saved to a file scripts/playback.py

import bpy

To call the operator from command line

blender -P scripts/playback.py tests/demo.blend

The operator makes a command based on your User Preferences > Files > Animation Player settings. enter image description here

Which in the case for Internal Player will be something like

Executing command:
   '/../bin/blender -a -f 24 1.0 -s 0 -e 4 -j 1 /tmp/0000.png'

see blender command line arguments

The script that generates the command can be found in 2.79/scripts/startup/bl_operators/screen_play_rendered_anim.py

blender -a -s 1 -e 250 /path_to_rendered_frames/name_of_1st_frame.png
  • 2
    $\begingroup$ I think this could do with some explanation of how this works. $\endgroup$ May 24 '18 at 17:31
  • $\begingroup$ I agree but I didn't find any doc about that. I just copied/paste the command that pops in the console when you press "Play Rendered Animation". $\endgroup$
    – thibsert
    May 24 '18 at 17:47
  • $\begingroup$ trying to deconstruct this, I believe the 1 is the variable frame_start and 250 is frame_end. $\endgroup$
    – sf8193
    May 24 '18 at 18:51
  • $\begingroup$ @thibsert Unfortunately when running this command from command line it does not show the whole animation $\endgroup$
    – sf8193
    May 24 '18 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.