diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 5093c1a6eee..ee4b34508d1 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -52,7 +52,7 @@ EnumPropertyItem brush_sculpt_tool_items[] = { {SCULPT_TOOL_BLOB, "BLOB", ICON_BRUSH_BLOB, "Blob", ""}, {SCULPT_TOOL_CLAY, "CLAY", ICON_BRUSH_CLAY, "Clay", ""}, {SCULPT_TOOL_CLAY_STRIPS, "CLAY_STRIPS", ICON_BRUSH_CLAY_STRIPS, "Clay Strips", ""}, - {SCULPT_TOOL_CREASE, "CREASE",ICON_BRUSH_CREASE, "Crease", ""}, + {SCULPT_TOOL_CREASE, "CREASE", ICON_BRUSH_CREASE, "Crease", ""}, {SCULPT_TOOL_DRAW, "DRAW", ICON_BRUSH_SCULPT_DRAW, "Draw", ""}, {SCULPT_TOOL_FILL, "FILL", ICON_BRUSH_FILL, "Fill", ""}, {SCULPT_TOOL_FLATTEN, "FLATTEN", ICON_BRUSH_FLATTEN, "Flatten", ""}, @@ -288,7 +288,7 @@ static void rna_Brush_set_size(PointerRNA *ptr, int value) Brush* brush = ptr->data; /* scale unprojected radius so it stays consistent with brush size */ - brush_scale_unprojected_radius(&brush->unprojected_radius, + BKE_brush_scale_unprojected_radius(&brush->unprojected_radius, value, brush->size); brush->size = value; } @@ -298,7 +298,7 @@ static void rna_Brush_set_unprojected_radius(PointerRNA *ptr, float value) Brush* brush = ptr->data; /* scale brush size so it stays consistent with unprojected_radius */ - brush_scale_size(&brush->size, value, brush->unprojected_radius); + BKE_brush_scale_size(&brush->size, value, brush->unprojected_radius); brush->unprojected_radius = value; } @@ -572,7 +572,7 @@ static void rna_def_brush(BlenderRNA *brna) prop = RNA_def_property(srna, "rate", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "rate"); - RNA_def_property_range(prop, 0.0001f , 10000.0f); + RNA_def_property_range(prop, 0.0001f, 10000.0f); RNA_def_property_ui_range(prop, 0.01f, 1.0f, 1, 3); RNA_def_property_ui_text(prop, "Rate", "Interval between paints for Airbrush"); RNA_def_property_update(prop, 0, "rna_Brush_update"); @@ -583,6 +583,13 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Color", ""); 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"); + RNA_def_property_update(prop, 0, "rna_Brush_update"); + 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); @@ -867,7 +874,7 @@ static void rna_def_brush(BlenderRNA *brna) prop = RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "clone.offset"); RNA_def_property_ui_text(prop, "Clone Offset", ""); - RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3); + RNA_def_property_ui_range(prop, -1.0f, 1.0f, 10.0f, 3); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update"); /* brush capabilities (mode-dependent) */ |