[Bf-blender-cvs] [c15bb3b55fa] blender-v2.83-release: Fix T77031: Blender as pymodule crashes when rendering

Campbell Barton noreply at git.blender.org
Mon May 25 07:55:16 CEST 2020


Commit: c15bb3b55faed1a8e5c9913553837539301fbe2e
Author: Campbell Barton
Date:   Mon May 25 15:35:51 2020 +1000
Branches: blender-v2.83-release
https://developer.blender.org/rBc15bb3b55faed1a8e5c9913553837539301fbe2e

Fix T77031: Blender as pymodule crashes when rendering

No longer enforce WITH_HEADLESS when building as a Python module
as it disables GPU access which is needed for rendering.

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

M	CMakeLists.txt
M	source/blender/windowmanager/intern/wm_splash_screen.c

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 71963bc0487..83f547eb593 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -608,12 +608,6 @@ if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
   message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
 endif()
 
-
-# may as well build python module without a UI
-if(WITH_PYTHON_MODULE)
-  set(WITH_HEADLESS ON)
-endif()
-
 if(NOT WITH_PYTHON)
   set(WITH_CYCLES OFF)
   set(WITH_DRACO OFF)
diff --git a/source/blender/windowmanager/intern/wm_splash_screen.c b/source/blender/windowmanager/intern/wm_splash_screen.c
index f209a2f31a3..17dc3e22984 100644
--- a/source/blender/windowmanager/intern/wm_splash_screen.c
+++ b/source/blender/windowmanager/intern/wm_splash_screen.c
@@ -164,6 +164,7 @@ static void wm_block_splash_add_labels(uiBlock *block, int x, int y)
 #endif /* WITH_BUILDINFO */
 }
 
+#ifndef WITH_HEADLESS
 static void wm_block_splash_image_roundcorners_add(ImBuf *ibuf)
 {
   uchar *rct = (uchar *)ibuf->rect;
@@ -214,6 +215,7 @@ static void wm_block_splash_image_roundcorners_add(ImBuf *ibuf)
     }
   }
 }
+#endif /* WITH_HEADLESS */
 
 static ImBuf *wm_block_splash_image(int width, int *r_height)
 {
@@ -254,6 +256,7 @@ static ImBuf *wm_block_splash_image(int width, int *r_height)
 
   return ibuf;
 #else
+  UNUSED_VARS(width, r_height);
   return NULL;
 #endif
 }



More information about the Bf-blender-cvs mailing list