python-console

Have you ever found yourself needing to change a .blend file remotely and VNC / Remote Desktop is not working?

In my case I finished rendering the left eye of a video, and wanted to do the same for the right one. I did it in parts due to the memory limit of the rendering station. And VNC is not working because … no idea. But it’s Friday and I won’t have physical access to the remote computer until next week.

Blender Interactive Console to the rescue!

$ ssh MY_REMOTE_COMPUTER
$ blender -b MYFILE.blend --python-console
(...)
(InteractiveConsole)
>>> import bpy
>>> bpy.context.scene.render.views['left'].use = False
>>> bpy.context.scene.render.views['right'].use = True
>>> bpy.ops.wm.save_mainfile()

Now all you need to do is resume your tmux session, and kick-off render once again. For different Blender command-line options try blender –help.

This post is obviously based on real events! Have a nice weekend 😉

3 Thoughts on “Blender Interactive Console

  1. Interesting approach, but if you have SSH access you also can also use SCP, pull the file to you, edit and SCP it back 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation