diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-14 00:05:36 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-14 00:05:36 +0400 |
commit | 972224b9e1934002f0c2ace326facd706c1e0b32 (patch) | |
tree | 436f31e0b82c271047eeeef9faca7b4161832dcf /source/blender/blenkernel | |
parent | 75af1a7f9eba4c761fea08995c5d529ed602a19a (diff) |
2.5/Sculpt:
* Moved the brush texture settings to MTex/TextureSlot. The mapping settings now show up in the texture panel, pretty much like they do for textures used with materials.
TODO:
* Tiled mode should not show Z size setting
* Add a locked mode so that texture size can be changed uniformly like in 2.4x
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 30a35cbe91c..5dbef017f9d 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -300,6 +300,13 @@ void brush_curve_preset(Brush *b, BrushCurvePreset preset) curvemapping_changed(b->curve, 0); } +static MTex *brush_active_texture(Brush *brush) +{ + if(brush && brush->texact >= 0) + return brush->mtex[brush->texact]; + return NULL; +} + int brush_texture_set_nr(Brush *brush, int nr) { ID *idtest, *id=NULL; @@ -1077,8 +1084,11 @@ void brush_radial_control_invoke(wmOperator *op, Brush *br, float size_weight) original_value = br->size * size_weight; else if(mode == WM_RADIALCONTROL_STRENGTH) original_value = br->alpha; - else if(mode == WM_RADIALCONTROL_ANGLE) - original_value = br->rot; + else if(mode == WM_RADIALCONTROL_ANGLE) { + MTex *mtex = brush_active_texture(br); + if(mtex) + original_value = mtex->rot; + } RNA_float_set(op->ptr, "initial_value", original_value); op->customdata = brush_gen_radial_control_imbuf(br); @@ -1094,8 +1104,11 @@ int brush_radial_control_exec(wmOperator *op, Brush *br, float size_weight) br->size = new_value * size_weight; else if(mode == WM_RADIALCONTROL_STRENGTH) br->alpha = new_value; - else if(mode == WM_RADIALCONTROL_ANGLE) - br->rot = new_value * conv; + else if(mode == WM_RADIALCONTROL_ANGLE) { + MTex *mtex = brush_active_texture(br); + if(mtex) + mtex->rot = new_value * conv; + } return OPERATOR_FINISHED; } |