Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader/intern/versioning_defaults.c')
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 4dd046d9a73..f3ae1426fa8 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -187,7 +187,7 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
}
}
- /* Be sure curfalloff is initializated */
+ /* Be sure curfalloff and primitive are initializated */
for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
ToolSettings *ts = scene->toolsettings;
if (ts->gp_sculpt.cur_falloff == NULL) {
@@ -199,6 +199,15 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
CURVE_PRESET_GAUSS,
CURVEMAP_SLOPE_POSITIVE);
}
+ if (ts->gp_sculpt.cur_primitive == NULL) {
+ ts->gp_sculpt.cur_primitive = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
+ CurveMapping *gp_primitive_curve = ts->gp_sculpt.cur_primitive;
+ curvemapping_initialize(gp_primitive_curve);
+ curvemap_reset(gp_primitive_curve->cm,
+ &gp_primitive_curve->clipr,
+ CURVE_PRESET_BELL,
+ CURVEMAP_SLOPE_POSITIVE);
+ }
}
}