mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
Extending https://github.com/IfcOpenShell/IfcOpenShell/commit/3ebb046619e43a1f42087e95fb9be1959cbfe0a4:
Force UI redraw to flush pending Blender operations, as Blender was crashing during bulk printing. Not 100% this fixed everything, as there are a few crashes that spring up still, but is better.
This commit is contained in:
@@ -299,6 +299,14 @@ class CreateDrawing(bpy.types.Operator):
|
||||
original_cache_setting = self.props.should_use_underlay_cache
|
||||
self.props.should_use_underlay_cache = False
|
||||
|
||||
# Force Blender to process all pending operations
|
||||
for area in context.screen.areas:
|
||||
area.tag_redraw()
|
||||
|
||||
# Process events to let Blender finish internal cleanup
|
||||
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
|
||||
|
||||
|
||||
self.camera = context.scene.camera
|
||||
assert (camera_element := tool.Ifc.get_entity(self.camera))
|
||||
self.camera_element = camera_element
|
||||
|
||||
Reference in New Issue
Block a user