Fix #147774: Newly created brush causes crash when used
While uncommon, brush initialization does happen in some addon workflows. Prior changes to use custom pressure curves in more places did not initialize the `CurveMapping` struct correctly. Pull Request: https://projects.blender.org/blender/blender/pulls/147840
This commit is contained in:
@@ -64,6 +64,16 @@ static void brush_init_data(ID *id)
|
||||
|
||||
/* the default alpha falloff curve */
|
||||
BKE_brush_curve_preset(brush, CURVE_PRESET_SMOOTH);
|
||||
|
||||
brush->automasking_cavity_curve = BKE_paint_default_curve();
|
||||
|
||||
brush->curve_rand_hue = BKE_paint_default_curve();
|
||||
brush->curve_rand_saturation = BKE_paint_default_curve();
|
||||
brush->curve_rand_value = BKE_paint_default_curve();
|
||||
|
||||
brush->curve_size = BKE_paint_default_curve();
|
||||
brush->curve_strength = BKE_paint_default_curve();
|
||||
brush->curve_jitter = BKE_paint_default_curve();
|
||||
}
|
||||
|
||||
static void brush_copy_data(Main * /*bmain*/,
|
||||
|
||||
Reference in New Issue
Block a user