From db6c4ba11ec3dbfc1711cdb1870629655e8ea8ee Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Aug 2012 16:07:11 +0000 Subject: bring back the play option from 2.4x --- source/creator/creator.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 01c850412de..7479935c179 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -453,16 +453,14 @@ static int set_env(int argc, const char **argv, void *UNUSED(data)) return 1; } -static int playback_mode(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) +static int playback_mode(int argc, const char **argv, void *UNUSED(data)) { + extern void playanim(int argc, const char **argv); + /* not if -b was given first */ if (G.background == 0) { -#if 0 /* TODO, bring player back? */ playanim(argc, argv); /* not the same argc and argv as before */ -#else - fprintf(stderr, "Playback mode not supported in blender 2.6x\n"); - exit(0); -#endif + exit(0); /* 2.4x didn't do this */ } return -2; @@ -1272,11 +1270,6 @@ int main(int argc, const char **argv) BLI_threadapi_init(); - RNA_init(); - RE_engines_init(); - - init_nodesystem(); - initglobals(); /* blender.c */ IMB_init(); @@ -1297,6 +1290,15 @@ int main(int argc, const char **argv) BLI_argsParse(ba, 1, NULL, NULL); #endif + + /* after level 1 args, this is so playanim skips RNA init */ + RNA_init(); + + RE_engines_init(); + init_nodesystem(); + /* end second init */ + + #if defined(WITH_PYTHON_MODULE) || defined(WITH_HEADLESS) G.background = 1; /* python module mode ALWAYS runs in background mode (for now) */ #else -- cgit v1.2.3