diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 3aa96749512..b5f4582d844 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -385,6 +385,7 @@ static bool rna_BrushCapabilitiesSculpt_has_direction_get(PointerRNA *ptr) Brush *br = (Brush *)ptr->data; return !ELEM(br->sculpt_tool, SCULPT_TOOL_DRAW, + SCULPT_TOOL_DRAW_SHARP, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_LAYER, @@ -648,6 +649,7 @@ static const EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, case PAINT_MODE_SCULPT: switch (me->sculpt_tool) { case SCULPT_TOOL_DRAW: + case SCULPT_TOOL_DRAW_SHARP: case SCULPT_TOOL_CREASE: case SCULPT_TOOL_BLOB: case SCULPT_TOOL_LAYER: @@ -1187,6 +1189,14 @@ static void rna_def_gpencil_options(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); + /* Simplify factor */ + prop = RNA_def_property(srna, "simplify_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "simplify_f"); + RNA_def_property_range(prop, 0, 100.0); + RNA_def_property_ui_range(prop, 0, 100.0, 1.0f, 3); + RNA_def_property_ui_text(prop, "Simplify", "Factor of Simplify using adaptive algorithm"); + RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); + /* Curves for pressure */ prop = RNA_def_property(srna, "curve_sensitivity", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "curve_sensitivity"); @@ -1771,7 +1781,6 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Brush_update"); prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR); - RNA_def_property_float_default(prop, 1.0f); 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, "Weight", "Vertex weight when brush is applied"); @@ -1779,7 +1788,6 @@ static void rna_def_brush(BlenderRNA *brna) prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "alpha"); - RNA_def_property_float_default(prop, 0.5f); 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( @@ -1799,7 +1807,6 @@ static void rna_def_brush(BlenderRNA *brna) prop = RNA_def_property(srna, "plane_trim", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "plane_trim"); - RNA_def_property_float_default(prop, 0.5f); RNA_def_property_range(prop, 0, 1.0f); RNA_def_property_ui_text( prop, @@ -1830,12 +1837,14 @@ static void rna_def_brush(BlenderRNA *brna) 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, "elastic_deform_compressibility", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "elastic_deform_compressibility"); - RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01f, 3); - RNA_def_property_ui_text( - prop, "Compressibility", "Material compressibility when simulating the elasticity"); + prop = RNA_def_property(srna, "elastic_deform_volume_preservation", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "elastic_deform_volume_preservation"); + RNA_def_property_range(prop, 0.0f, 0.9f); + RNA_def_property_ui_range(prop, 0.0f, 0.9f, 0.01f, 3); + RNA_def_property_ui_text(prop, + "Volume Preservation", + "Poisson ratio for elastic deformation. Higher values preserve volume " + "more, but also lead to more bulging"); RNA_def_property_update(prop, 0, "rna_Brush_update"); prop = RNA_def_property(srna, "rake_factor", PROP_FLOAT, PROP_FACTOR); @@ -1848,7 +1857,6 @@ static void rna_def_brush(BlenderRNA *brna) 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); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Crease Brush Pinch Factor", "How much the crease brush pinches"); RNA_def_property_update(prop, 0, "rna_Brush_update"); @@ -1876,7 +1884,6 @@ static void rna_def_brush(BlenderRNA *brna) prop = RNA_def_property(srna, "normal_radius_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "normal_radius_factor"); - RNA_def_property_float_default(prop, 0.5f); 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, @@ -1929,7 +1936,6 @@ static void rna_def_brush(BlenderRNA *brna) prop = RNA_def_property(srna, "blur_kernel_radius", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "blur_kernel_radius"); RNA_def_property_range(prop, 1, 10000); - RNA_def_property_int_default(prop, 2); RNA_def_property_ui_range(prop, 1, 50, 1, -1); RNA_def_property_ui_text( prop, "Kernel Radius", "Radius of kernel used for soften and sharpen in pixels"); @@ -1984,6 +1990,14 @@ static void rna_def_brush(BlenderRNA *brna) prop, "Spacing distance", "Calculate the brush spacing using view or scene distance"); RNA_def_property_update(prop, 0, "rna_Brush_update"); + prop = RNA_def_property(srna, "use_grab_active_vertex", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_GRAB_ACTIVE_VERTEX); + RNA_def_property_ui_text( + prop, + "Grab Active Vertex", + "Apply the maximum grab strength to the active vertex instead of the cursor location"); + RNA_def_property_update(prop, 0, "rna_Brush_update"); + prop = RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ALPHA_PRESSURE); RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); |