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:
authorAntony Riakiotakis <kalast@gmail.com>2013-12-12 21:01:11 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-12-12 21:01:11 +0400
commitc740f1a792fd47995b21422a84bc65f50d0b42ed (patch)
treea6a8aaaa2e183ea690a02e3d21b32fcbd880468e /source/blender/makesrna/intern
parent400fc9f86f6624fbe8a8a640d49579fca2466186 (diff)
Sculpt mode Gravity feature from GSOC 2010 by Jason Wilkins.
Reviewers: sergey, brecht, campbellbarton, jwilkins Differential Revision: http://developer.blender.org/D89
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c7
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c12
2 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 01e8c5956ff..bd4aa050689 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -248,6 +248,12 @@ static int rna_BrushCapabilities_has_texture_angle_get(PointerRNA *ptr)
MTEX_MAP_MODE_RANDOM);
}
+static int rna_SculptToolCapabilities_has_gravity_get(PointerRNA *ptr)
+{
+ Brush *br = (Brush *)ptr->data;
+ return br->sculpt_tool != SCULPT_TOOL_MASK;
+}
+
static int rna_BrushCapabilities_has_texture_angle_source_get(PointerRNA *ptr)
{
Brush *br = (Brush *)ptr->data;
@@ -556,6 +562,7 @@ static void rna_def_sculpt_capabilities(BlenderRNA *brna)
SCULPT_TOOL_CAPABILITY(has_smooth_stroke, "Has Smooth Stroke");
SCULPT_TOOL_CAPABILITY(has_space_attenuation, "Has Space Attenuation");
SCULPT_TOOL_CAPABILITY(has_strength, "Has Strength");
+ SCULPT_TOOL_CAPABILITY(has_gravity, "Has Gravity");
#undef SCULPT_CAPABILITY
}
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 6280e0833e5..402b75c9594 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -427,6 +427,18 @@ static void rna_def_sculpt(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Detail Refine Method",
"In dynamic-topology mode, how to add or remove mesh detail");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
+
+ prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "gravity_factor");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Gravity", "Amount of gravity after each dab");
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
+
+ prop = RNA_def_property(srna, "gravity_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Orientation", "Object whose Z axis defines orientation of gravity");
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
}