Merge branch 'blender-v4.5-release'
This commit is contained in:
@@ -385,6 +385,13 @@ static void brush_blend_read_data(BlendDataReader *reader, ID *id)
|
||||
BKE_previewimg_blend_read(reader, brush->preview);
|
||||
|
||||
brush->has_unsaved_changes = false;
|
||||
|
||||
/* Prior to 5.0, the brush->size value is expected to be the radius, not the diameter. To ensure
|
||||
* correct behavior, convert this when reading newer files. */
|
||||
if (BLO_read_fileversion_get(reader) > 500) {
|
||||
brush->size = std::max(brush->size / 2, 1);
|
||||
brush->unprojected_radius = std::max(brush->unprojected_radius / 2, 0.001f);
|
||||
}
|
||||
}
|
||||
|
||||
static void brush_blend_read_after_liblink(BlendLibReader * /*reader*/, ID *id)
|
||||
|
||||
@@ -1224,6 +1224,13 @@ static void scene_blend_read_data(BlendDataReader *reader, ID *id)
|
||||
zero_v3(ups->last_location);
|
||||
ups->last_hit = 0;
|
||||
|
||||
/* Prior to 5.0, the brush->size value is expected to be the radius, not the diameter. To
|
||||
* ensure correct behavior, convert this when reading newer files. */
|
||||
if (BLO_read_fileversion_get(reader)) {
|
||||
ups->size = std::max(ups->size / 2, 1);
|
||||
ups->unprojected_radius = std::max(ups->unprojected_radius / 2, 0.001f);
|
||||
}
|
||||
|
||||
BLO_read_struct(reader, CurveMapping, &ups->curve_rand_hue);
|
||||
if (ups->curve_rand_hue) {
|
||||
BKE_curvemapping_blend_read(reader, ups->curve_rand_hue);
|
||||
|
||||
Reference in New Issue
Block a user