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:
authorAntonioya <blendergit@gmail.com>2018-09-20 14:10:56 +0300
committerAntonioya <blendergit@gmail.com>2018-09-20 14:10:56 +0300
commit5bfcd6f303b458567870ab64fabf89713d679a78 (patch)
treeff7fabd74b3a4b771e25125cb6a86c51bc413b99 /source/blender/blenloader/intern/versioning_defaults.c
parentb9b371625d4e5697b4e4226e222a45a7f4e7dea5 (diff)
GP: Fix falloff curve using 2D animation template
Diffstat (limited to 'source/blender/blenloader/intern/versioning_defaults.c')
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 76fb42dc0b6..e6a5d20f017 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -39,6 +39,7 @@
#include "DNA_object_types.h"
#include "DNA_workspace_types.h"
+#include "BKE_colortools.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_node.h"
@@ -101,6 +102,19 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
workspace->object_mode = OB_MODE_GPENCIL_PAINT;
}
}
+ /* Be sure curfalloff is initializated */
+ for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
+ ToolSettings *ts = scene->toolsettings;
+ if (ts->gp_sculpt.cur_falloff == NULL) {
+ ts->gp_sculpt.cur_falloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
+ CurveMapping *gp_falloff_curve = ts->gp_sculpt.cur_falloff;
+ curvemapping_initialize(gp_falloff_curve);
+ curvemap_reset(gp_falloff_curve->cm,
+ &gp_falloff_curve->clipr,
+ CURVE_PRESET_GAUSS,
+ CURVEMAP_SLOPE_POSITIVE);
+ }
+ }
}
/* For all builtin templates shipped with Blender. */