[Bf-blender-cvs] [971cc0ae031] master: Cleanup: make it clear WM_main isn't called in background-mode

Campbell Barton noreply at git.blender.org
Tue Sep 15 05:33:44 CEST 2020


Commit: 971cc0ae03113eb0efe051d11aeae25cfe83d8f9
Author: Campbell Barton
Date:   Tue Sep 15 12:55:09 2020 +1000
Branches: master
https://developer.blender.org/rB971cc0ae03113eb0efe051d11aeae25cfe83d8f9

Cleanup: make it clear WM_main isn't called in background-mode

===================================================================

M	source/creator/creator.c

===================================================================

diff --git a/source/creator/creator.c b/source/creator/creator.c
index d2bfcb64b53..9df0ece26b5 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -518,11 +518,7 @@ int main(int argc,
   (void)argv;
 #endif
 
-#ifdef WITH_PYTHON_MODULE
-  /* Keep blender in background-mode running. */
-  return 0;
-#endif
-
+#ifndef WITH_PYTHON_MODULE
   if (G.background) {
     /* Using window-manager API in background-mode is a bit odd, but works fine. */
     WM_exit(C);
@@ -531,9 +527,9 @@ int main(int argc,
     if (!G.file_loaded) {
       WM_init_splash(C);
     }
+    WM_main(C);
   }
-
-  WM_main(C);
+#endif /* WITH_PYTHON_MODULE */
 
   return 0;
 } /* End of int main(...) function. */



More information about the Bf-blender-cvs mailing list