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:
authorJean Da Costa <jeacom256>2019-01-23 20:38:40 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-23 22:25:14 +0300
commitb592e34559da82f86339e97b25ceac9f844719ab (patch)
tree0f6f0d9a04ccd8eb0551a8c0cdc5ad4b80c9996c /source/blender/makesrna
parent4e9817a4fb2986b3d08da8380a6ce1d40c108970 (diff)
Sculpt: add Topology Rake, to align edges along brush while painting.
This helps to generate cleaner topology and define sharp features for dynamic topology. Best used on relatively low-poly meshes, it is not needed as much for high detail areas and has a performance impact. Differential Revision: https://developer.blender.org/D4189
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 4aadcb04ad5..91da8c65b07 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -174,6 +174,12 @@ static bool rna_BrushCapabilitiesSculpt_has_accumulate_get(PointerRNA *ptr)
return SCULPT_TOOL_HAS_ACCUMULATE(br->sculpt_tool);
}
+static bool rna_BrushCapabilitiesSculpt_has_topology_rake_get(PointerRNA *ptr)
+{
+ Brush *br = (Brush *)ptr->data;
+ return SCULPT_TOOL_HAS_TOPOLOGY_RAKE(br->sculpt_tool);
+}
+
static bool rna_BrushCapabilitiesSculpt_has_auto_smooth_get(PointerRNA *ptr)
{
Brush *br = (Brush *)ptr->data;
@@ -866,6 +872,7 @@ static void rna_def_sculpt_capabilities(BlenderRNA *brna)
SCULPT_TOOL_CAPABILITY(has_accumulate, "Has Accumulate");
SCULPT_TOOL_CAPABILITY(has_auto_smooth, "Has Auto Smooth");
+ SCULPT_TOOL_CAPABILITY(has_topology_rake, "Has Topology Rake");
SCULPT_TOOL_CAPABILITY(has_height, "Has Height");
SCULPT_TOOL_CAPABILITY(has_jitter, "Has Jitter");
SCULPT_TOOL_CAPABILITY(has_normal_weight, "Has Crease/Pinch Factor");
@@ -1610,6 +1617,17 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Autosmooth", "Amount of smoothing to automatically apply to each stroke");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "topology_rake_factor", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "topology_rake_factor");
+ RNA_def_property_float_default(prop, 0);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
+ RNA_def_property_ui_text(prop, "Topology Rake", "Automatically align edges to the brush direction to "
+ "to generate cleaner topology and define sharp features "
+ "dynamic topology. Best used on low-poly meshes as it has "
+ "a performance impact");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "stencil_pos", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "stencil_pos");
RNA_def_property_array(prop, 2);