diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-08-19 23:41:38 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-08-19 23:41:38 +0400 |
commit | 4095fac8493ec9697babe85cdb3af4b036a8e48c (patch) | |
tree | b4c1332e49112681329b3e26f5176398bea7b09b /source/blender | |
parent | 9db32483f30bbfbc16959965ffc85a2f4a4a0dac (diff) |
Fix crash caused by own commit to optimize out curvemapping
initialization. In sculpt mode, when using shift-click to switch to the
smooth brush it was possible to ommit initialization of curvemapping for
that brush.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 1 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 09f53281dbe..9812c49f08b 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -1022,6 +1022,7 @@ struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br) int half = side / 2; int i, j; + curvemapping_initialize(br->curve); texcache = BKE_brush_gen_texture_cache(br, half); im->rect_float = MEM_callocN(sizeof(float) * side * side, "radial control rect"); im->x = im->y = side; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 545c0f6f0e8..a5de6b1eea8 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -70,6 +70,7 @@ #include "BKE_node.h" #include "BKE_object.h" #include "BKE_subsurf.h" +#include "BKE_colortools.h" #include "BIF_glutil.h" @@ -3771,6 +3772,7 @@ static void sculpt_update_cache_invariants(bContext *C, Sculpt *sd, SculptSessio brush = br; cache->saved_smooth_size = BKE_brush_size_get(scene, brush); BKE_brush_size_set(scene, brush, size); + curvemapping_initialize(brush->curve); } } } |