diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-03-31 15:04:13 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-03-31 15:04:13 +0400 |
commit | 514c449a549662a29507f3a3d1eaabd7e216ea94 (patch) | |
tree | 69dc0385a50584fb78bfb4a86ee19ad77e97b049 /source/blender/makesrna/intern/rna_brush.c | |
parent | e8d532f1dde96c40c1407d39260724fcfee0b606 (diff) |
UI cleanup:
* Using masking is determined only by the presence of the texture,
remove extraneous DNA flag (might cause issues later but in practice
brush options are not harmful)
* Overlay and angle sliders are active during stencil mapped brushes
* Only draw the overlay if there's a texture.
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index fc46440d8cc..8946274fc38 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -145,9 +145,10 @@ static int rna_SculptToolCapabilities_has_normal_weight_get(PointerRNA *ptr) static int rna_BrushCapabilities_has_overlay_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; - return ELEM(br->mtex.brush_map_mode, + return ELEM3(br->mtex.brush_map_mode, MTEX_MAP_MODE_VIEW, - MTEX_MAP_MODE_TILED); + MTEX_MAP_MODE_TILED, + MTEX_MAP_MODE_STENCIL); } static int rna_SculptToolCapabilities_has_persistence_get(PointerRNA *ptr) @@ -237,10 +238,11 @@ static int rna_SculptToolCapabilities_has_strength_get(PointerRNA *ptr) static int rna_BrushCapabilities_has_texture_angle_get(PointerRNA *ptr) { Brush *br = (Brush *)ptr->data; - return ELEM3(br->mtex.brush_map_mode, + return ELEM4(br->mtex.brush_map_mode, MTEX_MAP_MODE_VIEW, MTEX_MAP_MODE_AREA, - MTEX_MAP_MODE_TILED); + MTEX_MAP_MODE_TILED, + MTEX_MAP_MODE_STENCIL); } static int rna_BrushCapabilities_has_texture_angle_source_get(PointerRNA *ptr) @@ -929,11 +931,6 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Restore Mesh", "Allow a single dot to be carefully positioned"); RNA_def_property_update(prop, 0, "rna_Brush_update"); - prop = RNA_def_property(srna, "use_mask", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_USE_MASK); - RNA_def_property_ui_text(prop, "Mask Texture", "Use a texture as mask for the brush"); - RNA_def_property_update(prop, 0, "rna_Brush_update"); - /* only for projection paint, TODO, other paint modes */ prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BRUSH_LOCK_ALPHA); |