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>2014-03-06 22:04:57 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-03-06 22:15:44 +0400
commit03afa6f9e7546d26766f0ac7bdb23da56a708306 (patch)
treec34f9f249c00c73caa76b18f80c6cc70a5416ce7 /source/blender/makesrna/intern/rna_sculpt_paint.c
parent2a167dafc2bf1582d6f56e0feab9f57ef9d48d5e (diff)
Experimental dyntopo feature:
Dyntopo detail in object space. This allows to set the detail in percentage of blender units and sculpt in this detail constantly, regardless of the distance to the mesh. This commit just enables the functionality, which is really trivial. There will be some more commits like detail flood fill and detail sampling in the future.
Diffstat (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c')
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 58274589126..e13e9b3cad4 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -357,6 +357,14 @@ static void rna_def_sculpt(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
+ static EnumPropertyItem detail_type_items[] = {
+ {0, "RELATIVE", 0,
+ "Relative Detail", "Mesh detail is relative to the brush size and detail size"},
+ {SCULPT_DYNTOPO_DETAIL_CONSTANT, "CONSTANT", 0,
+ "Constant Detail", "Mesh detail is constant in object space according to detail size"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
StructRNA *srna;
PropertyRNA *prop;
@@ -406,7 +414,7 @@ static void rna_def_sculpt(BlenderRNA *brna)
"Show diffuse color of object and overlay sculpt mask on top of it");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Sculpt_ShowDiffuseColor_update");
- prop = RNA_def_property(srna, "detail_size", PROP_INT, PROP_PIXEL);
+ prop = RNA_def_property(srna, "detail_size", PROP_INT, PROP_NONE);
RNA_def_property_ui_range(prop, 2, 100, 0, -1);
RNA_def_property_ui_text(prop, "Detail Size", "Maximum edge length for dynamic topology sculpting (in pixels)");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
@@ -429,6 +437,13 @@ static void rna_def_sculpt(BlenderRNA *brna)
"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, "detail_type_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
+ RNA_def_property_enum_items(prop, detail_type_items);
+ RNA_def_property_ui_text(prop, "Detail Type Method",
+ "In dynamic-topology mode, how mesh detail size is calculated");
+ 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);