Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606>2020-03-12 19:51:39 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-04-02 19:00:51 +0300
commitb8d9b5e3315232bb157de43713ec2a54433cf9a6 (patch)
tree8f14c626a0742b1e4539966348d847c8ba314dda /source/blender/makesrna/intern/rna_sculpt_paint.c
parent34465a7fb091664b07611353d99dcaa0862d4a4c (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/makesrna/intern/rna_sculpt_paint.c')
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index f1a5cb79db4..f2d5c465dac 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -617,6 +617,14 @@ static void rna_def_paint(BlenderRNA *brna)
prop, "Fast Navigate", "For multires, show low resolution while navigating the view");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
+ prop = RNA_def_property(srna, "use_sculpt_delay_updates", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_SCULPT_DELAY_UPDATES);
+ RNA_def_property_ui_text(
+ prop,
+ "Delay Viewport Updates",
+ "Update the geometry when it enters the view, providing faster view navigation");
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
+
prop = RNA_def_property(srna, "input_samples", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "num_input_samples");
RNA_def_property_ui_range(prop, 1, PAINT_MAX_INPUT_SAMPLES, 1, -1);