Featured post

new redirect for blender.org bpy docs.

http://www.blender.org/api/blender_python_api_current/ As of 10/11 november 2015 we can now link to the current api docs and not be worr...

July 02, 2012

Debugging Python Scripts for Blender

Today for the first time in months I couldn't figure out why an old Addon (Monster Tile Renderer) didn't work. The python interactive console remained suspiciously silent, blender was simply closing upon executing the Render button. I had forgotten how to use the script for Blender Internal, because Cycles has been my go-to renderer since it came out.

The only way to get some information is to run blender in debug mode: blender --debug-all. This told me blender was
"""
ERROR: Cannot render, no camera
Evaluate all animation - 0.000000
 No Actions, so no animation needs to be evaluated...
bpy.ops.render.render(animation=False, write_still=False, layer="", scene="")
zsh: segmentation fault (core dumped)  ./blender --debug-all
"""
So now I know to check for a camera before allowing render, this is something I had taken for granted.

No comments:

Post a Comment

Please use Blender.StackExchange.com for python scripting questions unrelated to this post.