diff options
author | Pablo Dobarro <pablodp606> | 2020-03-12 19:51:39 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-04-02 19:00:51 +0300 |
commit | b8d9b5e3315232bb157de43713ec2a54433cf9a6 (patch) | |
tree | 8f14c626a0742b1e4539966348d847c8ba314dda /source/blender/blenkernel/intern/pbvh_intern.h | |
parent | 34465a7fb091664b07611353d99dcaa0862d4a4c (diff) |
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
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh_intern.h')
-rw-r--r-- | source/blender/blenkernel/intern/pbvh_intern.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h index 21cb5649330..d3e42ac7705 100644 --- a/source/blender/blenkernel/intern/pbvh_intern.h +++ b/source/blender/blenkernel/intern/pbvh_intern.h @@ -168,6 +168,9 @@ struct PBVH { int cd_vert_node_offset; int cd_face_node_offset; + float planes[6][4]; + int num_planes; + struct BMLog *bm_log; struct SubdivCCG *subdiv_ccg; }; |