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:
authorCampbell Barton <ideasman42@gmail.com>2016-01-21 13:05:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-01-21 13:28:07 +0300
commitf758ee50e6d96e5342a9971bd76d9ff0352aafa3 (patch)
tree17dd061e81f09a0966984ceaf13818c908b76109 /source/blender/makesrna
parentadcef2bd3686a887fba8f08192751ab6736b9782 (diff)
Sculpt: Add rake option to snake-hook
This allows for dragging out shapes that rotate to follow the cursor motion. Values over 1 can be set for 'interesting' artistic effects.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 691fba273d3..9822b9f4a98 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -154,6 +154,12 @@ static int rna_SculptToolCapabilities_has_normal_weight_get(PointerRNA *ptr)
return SCULPT_TOOL_HAS_NORMAL_WEIGHT(br->sculpt_tool);
}
+static int rna_SculptToolCapabilities_has_rake_factor_get(PointerRNA *ptr)
+{
+ Brush *br = (Brush *)ptr->data;
+ return SCULPT_TOOL_HAS_RAKE(br->sculpt_tool);
+}
+
static int rna_BrushCapabilities_has_overlay_get(PointerRNA *ptr)
{
Brush *br = (Brush *)ptr->data;
@@ -706,6 +712,7 @@ static void rna_def_sculpt_capabilities(BlenderRNA *brna)
SCULPT_TOOL_CAPABILITY(has_height, "Has Height");
SCULPT_TOOL_CAPABILITY(has_jitter, "Has Jitter");
SCULPT_TOOL_CAPABILITY(has_normal_weight, "Has Crease/Pinch Factor");
+ SCULPT_TOOL_CAPABILITY(has_rake_factor, "Has Rake Factor");
SCULPT_TOOL_CAPABILITY(has_persistence, "Has Persistence");
SCULPT_TOOL_CAPABILITY(has_pinch_factor, "Has Pinch Factor");
SCULPT_TOOL_CAPABILITY(has_plane_offset, "Has Plane Offset");
@@ -1025,6 +1032,14 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Normal Weight", "How much grab will pull vertexes out of surface during a grab");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "rake_factor", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "rake_factor");
+ RNA_def_property_float_default(prop, 0);
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
+ RNA_def_property_ui_text(prop, "Rake", "How much grab will follow cursor rotation");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "crease_pinch_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "crease_pinch_factor");
RNA_def_property_float_default(prop, 2.0f / 3.0f);