Very small feature for use in a buildsystem (return 1 to shell when a script fails)
Closed, ArchivedPublic


This is the first patch I've submitted so apologies If if missed something.

I run python scripts in blender in a build system (cmake) to export/cook meshes, anims and so forth and I want it to return an error to the shell if a script fails to run, so make/msvcpp knows it failed.

I've used afbreek in Global G, and made BPY_run_python_script return a value based on the success of the script.

It adds a cmd line option (-K didn't seem to be used) which is identical to (-P) except if the script fails it stops processing cmd line options and exits cleanly (i.e. not just by calling exit(1)), returning 1 to the shell.

Apologies if there's another way to accomplish this (and let me know what it is!), but I thought I'd submit the patch in case its any use.

All other functionality is left unchanged.



Hi, trying to update the status of the patch tracker. Please respond if this patch is still viable/useful and needs review or if it can be closed.

Bastien Montagne (mont29) closed this task as Archived.Aug 3 2014, 11:11 AM
Bastien Montagne (mont29) claimed this task.

Time to archive.