[Bf-extensions-cvs] [599a8db3] master: Fix T78854: Cell fracture fails in background mode
Campbell Barton
noreply at git.blender.org
Tue Apr 26 11:18:29 CEST 2022
Commit: 599a8db33c45c2ad94f8d482f01b281252799770
Author: Campbell Barton
Date: Tue Apr 26 19:13:02 2022 +1000
Branches: master
https://developer.blender.org/rBA599a8db33c45c2ad94f8d482f01b281252799770
Fix T78854: Cell fracture fails in background mode
Disable redrawing in background mode.
===================================================================
M object_fracture_cell/fracture_cell_setup.py
===================================================================
diff --git a/object_fracture_cell/fracture_cell_setup.py b/object_fracture_cell/fracture_cell_setup.py
index dfd7975c..ccb1e204 100644
--- a/object_fracture_cell/fracture_cell_setup.py
+++ b/object_fracture_cell/fracture_cell_setup.py
@@ -7,13 +7,14 @@
import bpy
import bmesh
-
-def _redraw_yasiamevil():
- _redraw_yasiamevil.opr(**_redraw_yasiamevil.arg)
-
-
-_redraw_yasiamevil.opr = bpy.ops.wm.redraw_timer
-_redraw_yasiamevil.arg = dict(type='DRAW_WIN_SWAP', iterations=1)
+if bpy.app.background:
+ def _redraw_yasiamevil():
+ pass
+else:
+ def _redraw_yasiamevil():
+ _redraw_yasiamevil.opr(**_redraw_yasiamevil.arg)
+ _redraw_yasiamevil.opr = bpy.ops.wm.redraw_timer
+ _redraw_yasiamevil.arg = dict(type='DRAW_WIN_SWAP', iterations=1)
def _points_from_object(depsgraph, scene, obj, source):
More information about the Bf-extensions-cvs
mailing list