Sculpt: Delay Viewport Updates

In Blender 2.81 we update and draw all nodes inside the view planes.
When navigating with a pen tablet after an operation that tags the whole
mesh to update (like undo or inverting the mask), this introduces some
lag as nodes are updating when they enter the view. The viewport is not
fully responsive again until all nodes have entered the view after the
operation.

This commit delays nodes updates until the view navigation stops, so the
viewport navigation is always fully responsive. This introduces some
artifacts while navigating,  so it can be disabled if you don't want to
see them.

I'm storing the update planes in the PBVH. This way I can add support
for some tools to update in real-time only the nodes inside this plane
while running the operator, like the mesh filter.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6269
This commit is contained in:
Pablo Dobarro
2020-03-12 17:51:39 +01:00
committed by Pablo Dobarro
parent 34465a7fb0
commit b8d9b5e331
7 changed files with 89 additions and 13 deletions

View File

@@ -903,6 +903,8 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
col = flow.column()
col.prop(sculpt, "show_low_resolution")
col = flow.column()
col.prop(sculpt, "use_sculpt_delay_updates")
col = flow.column()
col.prop(sculpt, "use_deform_only")
col = flow.column()