Commit: d3e1b043c37398ac1e1027a6004239dee8a055f0
Author: Antonioya
Date:   Tue Dec 18 10:44:13 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBd3e1b043c37398ac1e1027a6004239dee8a055f0

Fix T59548: Grease Pencil Primitives ignore the 'draw below' option

===================================================================

M       source/blender/editors/gpencil/gpencil_primitive.c

===================================================================

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 */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to