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@gmail.com>2020-03-27 20:14:14 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-03-27 20:15:42 +0300
commit9120191fe2a28a3d01a51f536df7b433a7764803 (patch)
treeda5320d63d3a2d41fe79499f826e9805adcd3536 /source/blender/makesrna
parent4c0cca78eb43df1841d5ef9e084e5d41aae2217b (diff)
Sculpt: Pose Brush Face Sets origin mode
This commit introduces a new mode for calculating the positions and weights of the IK segments in the Pose Brush based on the Face Sets. The first segment of the chain will always include all face sets inside the brush radius and it will propagate until the boundary of the last face sets added in the flood fill. Then consecutive connected face sets are added to the chain until the chain length limit is reached or all face sets of the mesh are already part of the chain. This feature enables complete control over the pose brush origins in case that is needed. Also, with this mode, the user can have a library of base meshes with face sets already configured to get to the initial pose as fast as possible. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7235
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 2a777c53cab..9615ac47738 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -1805,6 +1805,20 @@ static void rna_def_brush(BlenderRNA *brna)
0,
"Surface",
"Smooths the surface of the mesh, preserving the volue"},
+ };
+
+ static const EnumPropertyItem brush_pose_origin_type_items[] = {
+ {BRUSH_POSE_ORIGIN_TOPOLOGY,
+ "TOPOLOGY",
+ 0,
+ "Topology",
+ "Sets the rotation origin automatically using the topology and shape of the mesh as a "
+ "guide"},
+ {BRUSH_POSE_ORIGIN_FACE_SETS,
+ "FACE_SETS",
+ 0,
+ "Face Sets",
+ "Creates a pose segment per face sets, starting from the active face set"},
{0, NULL, 0, NULL, NULL},
};
@@ -1928,6 +1942,13 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "pose_origin_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, brush_pose_origin_type_items);
+ RNA_def_property_ui_text(prop,
+ "Rotation Origins",
+ "Method to set the rotation origins for the segments of the brush");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "jitter_unit", PROP_ENUM, PROP_NONE); /* as an enum */
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, brush_jitter_unit_items);