forked from bartvdbraak/blender
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.
This commit is contained in:
parent
4ed6605d65
commit
7e529c2a64
@ -1405,6 +1405,14 @@ static int load_file(int UNUSED(argc), const char **argv, void *data)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* failed to load file, stop processing arguments */
|
/* 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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user