diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-09-05 18:02:59 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-09-05 18:02:59 +0400 |
commit | 4b1436b5252a6a006f0155e1bbb6c6b449b8f4e9 (patch) | |
tree | d544d077b8668520bac726677848fcf3a31131e3 /source/blender/blenkernel/intern/brush.c | |
parent | 4df6c73d25f9e772d52b083655157ee99eeb617f (diff) |
Ctr-Alt-F radial control operator for texture painting, controls the
rotation of the brush mask texture.
Unfortunately secondary path does not work here because we do not have a
permanent switch to choose between primary-secondary brush texture. Use
operator property instead.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 9812c49f08b..790c1f09ff0 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -970,10 +970,10 @@ float BKE_brush_curve_strength(Brush *br, float p, const float len) } /* TODO: should probably be unified with BrushPainter stuff? */ -unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side) +unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side, bool use_secondary) { unsigned int *texcache = NULL; - MTex *mtex = &br->mtex; + MTex *mtex = (use_secondary) ? &br->mask_mtex : &br->mtex; TexResult texres = {0}; int hasrgb, ix, iy; int side = half_side * 2; @@ -1014,7 +1014,7 @@ unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side) /**** Radial Control ****/ -struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br) +struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br, bool secondary) { ImBuf *im = MEM_callocN(sizeof(ImBuf), "radial control texture"); unsigned int *texcache; @@ -1023,7 +1023,7 @@ struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br) int i, j; curvemapping_initialize(br->curve); - texcache = BKE_brush_gen_texture_cache(br, half); + texcache = BKE_brush_gen_texture_cache(br, half, secondary); im->rect_float = MEM_callocN(sizeof(float) * side * side, "radial control rect"); im->x = im->y = side; |