diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 21 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 17 |
2 files changed, 38 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index ee4718aff03..c86a852b0ea 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -247,6 +247,7 @@ const EnumPropertyItem rna_enum_brush_curves_sculpt_tool_items[] = { {CURVES_SCULPT_TOOL_COMB, "COMB", ICON_NONE, "Comb", ""}, {CURVES_SCULPT_TOOL_DELETE, "DELETE", ICON_NONE, "Delete", ""}, {CURVES_SCULPT_TOOL_SNAKE_HOOK, "SNAKE_HOOK", ICON_NONE, "Snake Hook", ""}, + {CURVES_SCULPT_TOOL_ADD, "ADD", ICON_NONE, "Add", ""}, {CURVES_SCULPT_TOOL_TEST1, "TEST1", ICON_NONE, "Test 1", ""}, {CURVES_SCULPT_TOOL_TEST2, "TEST2", ICON_NONE, "Test 2", ""}, {0, NULL, 0, NULL, NULL}, @@ -1913,6 +1914,20 @@ static void rna_def_gpencil_options(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); } +static void rna_def_curves_sculpt_options(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "BrushCurvesSculptSettings", NULL); + RNA_def_struct_sdna(srna, "BrushCurvesSculptSettings"); + RNA_def_struct_ui_text(srna, "Curves Sculpt Brush Settings", ""); + + prop = RNA_def_property(srna, "add_amount", PROP_INT, PROP_NONE); + RNA_def_property_range(prop, 1, INT32_MAX); + RNA_def_property_ui_text(prop, "Add Amount", "Number of curves added by the Add brush"); +} + static void rna_def_brush(BlenderRNA *brna) { StructRNA *srna; @@ -3491,6 +3506,11 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "gpencil_settings"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Gpencil Settings", ""); + + prop = RNA_def_property(srna, "curves_sculpt_settings", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "BrushCurvesSculptSettings"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Curves Sculpt Settings", ""); } /** @@ -3577,6 +3597,7 @@ void RNA_def_brush(BlenderRNA *brna) rna_def_vertex_paint_capabilities(brna); rna_def_weight_paint_capabilities(brna); rna_def_gpencil_options(brna); + rna_def_curves_sculpt_options(brna); rna_def_brush_texture_slot(brna); rna_def_operator_stroke_element(brna); } diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 40f3d79b363..97e1f325816 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -1518,6 +1518,23 @@ static void rna_def_curves_sculpt(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Distance", "Radius around curves roots in which no new curves can be added"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + + prop = RNA_def_property(srna, "interpolate_length", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", CURVES_SCULPT_FLAG_INTERPOLATE_LENGTH); + RNA_def_property_ui_text( + prop, "Interpolate Length", "Use length of the curves in close proximity"); + + prop = RNA_def_property(srna, "interpolate_shape", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", CURVES_SCULPT_FLAG_INTERPOLATE_SHAPE); + RNA_def_property_ui_text( + prop, "Interpolate Shape", "Use shape of the curves in close proximity"); + + prop = RNA_def_property(srna, "curve_length", PROP_FLOAT, PROP_DISTANCE); + RNA_def_property_range(prop, 0.0, FLT_MAX); + RNA_def_property_ui_text( + prop, + "Curve Length", + "Length of newly added curves when it is not interpolated from other curves"); } void RNA_def_sculpt_paint(BlenderRNA *brna) |