[Bf-blender-cvs] [60935cb9d8b] blender2.8: GP: Ensure falloff curve is always initializated
Antonioya
noreply at git.blender.org
Sun Sep 30 15:59:23 CEST 2018
Commit: 60935cb9d8bd94098eabbf84140fe07ce810fc03
Author: Antonioya
Date: Sun Sep 30 15:59:10 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB60935cb9d8bd94098eabbf84140fe07ce810fc03
GP: Ensure falloff curve is always initializated
===================================================================
M source/blender/editors/gpencil/gpencil_utils.c
===================================================================
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);
+ }
}
/* ******************************************************** */
More information about the Bf-blender-cvs
mailing list