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.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user