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:
authorAntonio Vazquez <blendergit@gmail.com>2020-08-14 20:04:53 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-08-14 20:05:05 +0300
commit36e4d4af5b01e0eb7f90ac34a8b7f8e01118f5fa (patch)
treeaf89c082a36239ed47ffab7e17355ad79d7d4fa0 /source/blender/editors/gpencil/gpencil_fill.c
parentf491442eb06bb562cbfef5062ae0c7743aa9d1bd (diff)
Fix T79772: Gpencil. Additive drawing doesn't work when creating fills
This option was not supported in Fill tool
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_fill.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_fill.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 2855f2cc0d7..9d99773348b 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -237,6 +237,7 @@ static void gpencil_draw_datablock(tGPDfill *tgpf, const float ink[4])
bGPdata *gpd = tgpf->gpd;
Brush *brush = tgpf->brush;
BrushGpencilSettings *brush_settings = brush->gpencil_settings;
+ ToolSettings *ts = tgpf->scene->toolsettings;
tGPDdraw tgpw;
tgpw.rv3d = tgpf->rv3d;
@@ -309,7 +310,14 @@ static void gpencil_draw_datablock(tGPDfill *tgpf, const float ink[4])
/* if active layer and no keyframe, create a new one */
if (gpl == tgpf->gpl) {
if ((gpl->actframe == NULL) || (gpl->actframe->framenum != tgpf->active_cfra)) {
- BKE_gpencil_layer_frame_get(gpl, tgpf->active_cfra, GP_GETFRAME_ADD_NEW);
+ short add_frame_mode;
+ if (ts->gpencil_flags & GP_TOOL_FLAG_RETAIN_LAST) {
+ add_frame_mode = GP_GETFRAME_ADD_COPY;
+ }
+ else {
+ add_frame_mode = GP_GETFRAME_ADD_NEW;
+ }
+ BKE_gpencil_layer_frame_get(gpl, tgpf->active_cfra, add_frame_mode);
}
}