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:
authorHans Goudey <h.goudey@me.com>2022-07-07 16:06:30 +0300
committerHans Goudey <h.goudey@me.com>2022-07-07 16:06:30 +0300
commite3ef56ef91417519a3301746f4cfd244cd08ef85 (patch)
tree8995e7532d15c64de3c4629aba7b528376a1c4c6 /source/blender/draw/tests
parent5d6e7df4a8b70aa98d86655b024a87ca3319c6be (diff)
Curves: Add sculpt selection overlay
This commit adds visualization to the selection in curves sculpt mode. Previously it was only possible to see the selection when it was connected to a material. In order to obstruct the users vision as little as possible, the selected areas of the curve are left as is, but a dark overlay is drawn over unselected areas. To make it work, the overlay requests the selection attribute and then ensures that the evaluation is complete for curves. Then it retrieves the evaluated selection GPU texture and passes that to the shader. This reuses the existing generic attribute extraction system because there currently wouldn't be any benefits to dealing with selection separately, and because it avoids duplication of the logic that extracts attributes from curves and evaluates them if necessary. Differential Revision: https://developer.blender.org/D15219
Diffstat (limited to 'source/blender/draw/tests')
-rw-r--r--source/blender/draw/tests/shaders_test.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/draw/tests/shaders_test.cc b/source/blender/draw/tests/shaders_test.cc
index 2bc0c9af895..f8c5715e2f5 100644
--- a/source/blender/draw/tests/shaders_test.cc
+++ b/source/blender/draw/tests/shaders_test.cc
@@ -270,6 +270,7 @@ static void test_overlay_glsl_shaders()
EXPECT_NE(OVERLAY_shader_particle_dot(), nullptr);
EXPECT_NE(OVERLAY_shader_particle_shape(), nullptr);
EXPECT_NE(OVERLAY_shader_sculpt_mask(), nullptr);
+ EXPECT_NE(OVERLAY_shader_sculpt_curves_selection(), nullptr);
EXPECT_NE(OVERLAY_shader_volume_velocity(false, false), nullptr);
EXPECT_NE(OVERLAY_shader_volume_velocity(false, true), nullptr);
EXPECT_NE(OVERLAY_shader_volume_velocity(true, false), nullptr);