From 4b1436b5252a6a006f0155e1bbb6c6b449b8f4e9 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Thu, 5 Sep 2013 14:02:59 +0000 Subject: 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. --- source/blender/blenkernel/intern/brush.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/brush.c') 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; -- cgit v1.2.3