diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-18 15:07:39 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-18 15:07:39 +0300 |
commit | 7e529c2a64752c0483f84024fb71edc11d88578e (patch) | |
tree | 4f0e647d131277083a1bea9ab49a10ca41c39e09 | |
parent | 4ed6605d654c0eca52c692963894dcc55529fd21 (diff) |
Return non-zero exit code when running blender from the command line and reading file has failed
This way automated scripts can actually see if some issue happened.
-rw-r--r-- | source/creator/creator.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 8c1ae3d8c87..856d0e10f1f 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -1405,6 +1405,14 @@ static int load_file(int UNUSED(argc), const char **argv, void *data) } else { /* failed to load file, stop processing arguments */ + if (G.background) { + /* Set is_break if running in the background mode so + * blender will return non-zero exit code which then + * could be used in automated script to control how + * good or bad things are. + */ + G.is_break = true; + } return -1; } |