diff options
author | Antonioya <blendergit@gmail.com> | 2018-09-30 16:59:10 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-09-30 16:59:10 +0300 |
commit | 60935cb9d8bd94098eabbf84140fe07ce810fc03 (patch) | |
tree | 95440bdccf5fdc5c2b9c031c2939b9b41b6c7e99 /source/blender/editors/gpencil/gpencil_utils.c | |
parent | 8c3077ff94ecd25f55c46ac9dd792c27bda4e75b (diff) |
GP: Ensure falloff curve is always initializated
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_utils.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 9072a18eb88..eb4307b9f86 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -50,6 +50,7 @@ #include "DNA_view3d_types.h" #include "BKE_action.h" +#include "BKE_colortools.h" #include "BKE_deform.h" #include "BKE_main.h" #include "BKE_brush.h" @@ -1204,6 +1205,16 @@ void ED_gpencil_add_defaults(bContext *C) BKE_brush_gpencil_presets(C); } + /* ensure multiframe falloff curve */ + 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); + } } /* ******************************************************** */ |