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-12-18 12:44:13 +0300
committerAntonioya <blendergit@gmail.com>2018-12-18 12:44:35 +0300
commitd3e1b043c37398ac1e1027a6004239dee8a055f0 (patch)
treec9fbc8706b5c8ada5b16e1a2b73a3ff9553f63ea
parent787660e15a628dab27ea5e509d3b1b72edd9ce52 (diff)
Fix T59548: Grease Pencil Primitives ignore the 'draw below' option
-rw-r--r--source/blender/editors/gpencil/gpencil_primitive.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index 7faf399747b..c88d0a346dd 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -1160,7 +1160,12 @@ static void gpencil_primitive_interaction_end(bContext *C, wmOperator *op, wmWin
}
/* transfer stroke from temporary buffer to the actual frame */
- BLI_movelisttolist(&gpf->strokes, &tgpi->gpf->strokes);
+ if (ts->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) {
+ BLI_movelisttolist_reverse(&gpf->strokes, &tgpi->gpf->strokes);
+ }
+ else {
+ BLI_movelisttolist(&gpf->strokes, &tgpi->gpf->strokes);
+ }
BLI_assert(BLI_listbase_is_empty(&tgpi->gpf->strokes));
/* add weights if required */