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-05-31 20:00:24 +0300
committerHans Goudey <h.goudey@me.com>2022-05-31 20:00:24 +0300
commita1830859fa98d529a2eae709b2557a91f1bbe9e7 (patch)
tree7ae959d2351cfbabe0f28a6077096b197b3911c1 /source/blender/makesrna/intern/rna_attribute.c
parent96f20ddc1e84e0f5036ea1bdda8381f037069f77 (diff)
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
Diffstat (limited to 'source/blender/makesrna/intern/rna_attribute.c')
-rw-r--r--source/blender/makesrna/intern/rna_attribute.c5
1 files changed, 5 insertions, 0 deletions
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"