Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r--source/creator/creator.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index e313a5f7aaa..7aee66eeb00 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -435,9 +435,12 @@ static int playback_mode(int UNUSED(argc), const char **UNUSED(argv), void *UNUS
{
/* not if -b was given first */
if (G.background == 0) {
-
-// XXX playanim(argc, argv); /* not the same argc and argv as before */
+#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.5x\n");
exit(0);
+#endif
}
return -2;
@@ -1135,7 +1138,8 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
#ifdef WITH_PYTHON_MODULE
/* allow python module to call main */
-#define main main_python
+#define main main_python_enter
+static void *evil_C= NULL;
#endif
int main(int argc, const char **argv)
@@ -1146,6 +1150,7 @@ int main(int argc, const char **argv)
#ifdef WITH_PYTHON_MODULE
#undef main
+ evil_C= C;
#endif
#ifdef WITH_BINRELOC
@@ -1314,6 +1319,14 @@ int main(int argc, const char **argv)
return 0;
} /* end of int main(argc,argv) */
+#ifdef WITH_PYTHON_MODULE
+void main_python_exit(void)
+{
+ WM_exit((bContext *)evil_C);
+ evil_C= NULL;
+}
+#endif
+
static void error_cb(const char *err)
{