From a1830859fa98d529a2eae709b2557a91f1bbe9e7 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 31 May 2022 19:00:24 +0200 Subject: Curves: Add soft selection in sculpt mode This commit adds a float selection to curve control points or curves, a sculpt tool to paint the selection, and uses the selection influence in the existing sculpt brushes. The selection is the inverse of the "mask" from mesh sculpt mode currently. That change is described in more detail here: T97903 Since some sculpt tools are really "per curve" tools, they use the average point selection of all of their points. The delete brush considers a curve selected if any of its points have a non-zero selection. There is a new option to choose the selection domain, which affects how painting the selection works. You can also turn the selection off by clicking on the active domain. Sculpt brushes can be faster when the selection is small, because finding selected curves or points is generally faster than the existing brush intersection and distance checks. The main limitation currently is that we can't see the selection in the viewport by default. For now, to see the selection one has to add a simple material to the curves object as shown in the differential revision. And one has to switch to Material Preview in the 3d view. Differential Revision: https://developer.blender.org/D14934 --- source/blender/makesrna/intern/rna_attribute.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/makesrna/intern/rna_attribute.c') diff --git a/source/blender/makesrna/intern/rna_attribute.c b/source/blender/makesrna/intern/rna_attribute.c index 0cea693cd2a..76e1e712cad 100644 --- a/source/blender/makesrna/intern/rna_attribute.c +++ b/source/blender/makesrna/intern/rna_attribute.c @@ -106,6 +106,11 @@ const EnumPropertyItem rna_enum_color_attribute_domain_items[] = { {ATTR_DOMAIN_CORNER, "CORNER", 0, "Face Corner", ""}, {0, NULL, 0, NULL, NULL}}; +const EnumPropertyItem rna_enum_attribute_curves_domain_items[] = { + {ATTR_DOMAIN_POINT, "POINT", 0, "Control Point", ""}, + {ATTR_DOMAIN_CURVE, "CURVE", 0, "Curve", ""}, + {0, NULL, 0, NULL, NULL}}; + #ifdef RNA_RUNTIME # include "BLI_math.h" -- cgit v1.2.3