diff options
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 33e89962fe5..41ecd90916d 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -62,6 +62,7 @@ #include "BKE_scene.h" #include "BKE_node.h" #include "BKE_report.h" +#include "BKE_sound.h" #include "IMB_imbuf.h" // for quicktime_init @@ -219,6 +220,7 @@ static void print_help(void) printf (" -d\t\tTurn debugging on\n"); printf (" -nojoystick\tDisable joystick support\n"); printf (" -noglsl\tDisable GLSL shading\n"); + printf (" -noaudio\tForce sound system to None\n"); printf (" -h\t\tPrint this help text\n"); printf (" -y\t\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes)\n"); printf (" -P <filename>\tRun the given Python script (filename or Blender Text)\n"); @@ -508,8 +510,10 @@ int main(int argc, char **argv) SYS_WriteCommandLineInt(syshandle,"nojoystick",1); if (G.f & G_DEBUG) printf("disabling nojoystick\n"); } - if (BLI_strcasecmp(argv[a], "-noglsl") == 0) + else if (BLI_strcasecmp(argv[a], "-noglsl") == 0) GPU_extensions_disable(); + else if (BLI_strcasecmp(argv[a], "-noaudio") == 0) + sound_disable(); break; } } @@ -536,6 +540,7 @@ int main(int argc, char **argv) #endif } else { + /* background mode options */ for(a=1; a<argc; a++) { if(argv[a][0] == '-') { switch(argv[a][1]) { @@ -551,6 +556,11 @@ int main(int argc, char **argv) printf("argv[%d] = %s\n", i, argv[i]); } break; + case 'n': + case 'N': + if (BLI_strcasecmp(argv[a], "-noaudio") == 0) + sound_disable(); + break; } } } @@ -667,10 +677,13 @@ int main(int argc, char **argv) if (a < argc) { int frame = atoi(argv[a]); Render *re = RE_NewRender(scene->id.name); + ReportList reports; + + BKE_reports_init(&reports, RPT_PRINT); frame = MIN2(MAXFRAME, MAX2(MINAFRAME, frame)); - RE_BlenderAnim(re, scene, frame, frame, scene->r.frame_step); + RE_BlenderAnim(re, scene, frame, frame, scene->r.frame_step, &reports); } } else { printf("\nError: no blend loaded. cannot use '-f'.\n"); @@ -680,7 +693,9 @@ int main(int argc, char **argv) if (CTX_data_scene(C)) { Scene *scene= CTX_data_scene(C); Render *re= RE_NewRender(scene->id.name); - RE_BlenderAnim(re, scene, scene->r.sfra, scene->r.efra, scene->r.frame_step); + ReportList reports; + BKE_reports_init(&reports, RPT_PRINT); + RE_BlenderAnim(re, scene, scene->r.sfra, scene->r.efra, scene->r.frame_step, &reports); } else { printf("\nError: no blend loaded. cannot use '-a'.\n"); } |