From 251ef0a47f34806b911ab18b59f604dd0ef3ea5b Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Sun, 3 Jan 2010 08:37:18 +0000 Subject: Changes to Brush texture workflow This changes how textures are accessed from Brushes, with the intention of simplifying the workflow, and reducing the amount of clicking. Rather than the previous texture slots (which didn't work as a stack anyway), brushes now have a single texture linked. Rather than taking time having to set up your slots in advance, you can now select and change textures directly as you sculpt/paint on the fly. For complex brushes, node textures can be used, or for fast access, it's easy to make a duplicate of your brush with the texture you like and assign a hotkey. Brush textures can now be chosen from a new Textures panel in the brush tool properties - click on the thumbnail to open a texture selector. This is done using a new variation on the ID template - the number of rows and columns to display in the popup can be customised in the UI scripts. --- source/blender/editors/sculpt_paint/paint_image.c | 2 +- source/blender/editors/sculpt_paint/sculpt.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 526eb2d6661..4c903f66def 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -2890,7 +2890,7 @@ static void project_paint_begin(ProjPaintState *ps) ps->is_airbrush = (ps->brush->flag & BRUSH_AIRBRUSH) ? 1 : 0; - ps->is_texbrush = (ps->brush->mtex[ps->brush->texact] && ps->brush->mtex[ps->brush->texact]->tex) ? 1 : 0; + ps->is_texbrush = (ps->brush->mtex.tex) ? 1 : 0; /* calculate vert screen coords diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 09b99f4f43c..75cc927cf0e 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -614,12 +614,9 @@ static float get_texcache_pixel_bilinear(const SculptSession *ss, float u, float /* Return a multiplier for brush strength on a particular vertex. */ static float tex_strength(SculptSession *ss, Brush *br, float *point, const float len) { - MTex *tex = NULL; + MTex *tex = &br->mtex; float avg= 1; - if(br->texact >= 0) - tex = br->mtex[br->texact]; - if(!tex) { avg= 1; } -- cgit v1.2.3