GPencil: Cleanup - Rename function for better naming
authorAntonioya <blendergit@gmail.com>
Mon, 8 Aug 2016 09:26:00 +0000 (11:26 +0200)
committerAntonioya <blendergit@gmail.com>
Mon, 8 Aug 2016 09:26:28 +0000 (11:26 +0200)
The old function name was not clear enough

source/blender/editors/gpencil/gpencil_paint.c

index 3afdd5772fc9b04655548d63f41e9c46c249264a..e7e39a8579219c9361b7815908997ff8e0c48fb8 100644 (file)
@@ -2287,8 +2287,8 @@ static void gpencil_stroke_end(wmOperator *op)
        p->gpf = NULL;
 }
 
-/* if drawing polygon and draw on back is enabled, move the stroke below all previous strokes */
-static void gpencil_move_polygon_stroke_to_back(bContext *C)
+/* Move last stroke in the listbase to the head to be drawn below all previous strokes in the layer */
+static void gpencil_move_last_stroke_to_back(bContext *C)
 {
        /* move last stroke (the polygon) to head of the listbase stroke to draw on back of all previous strokes */
        bGPdata *gpd = ED_gpencil_data_get_active(C);
@@ -2368,7 +2368,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
                /* if drawing polygon and enable on back, must move stroke */
                if ((p->scene->toolsettings->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) && (p->paintmode == GP_PAINTMODE_DRAW_POLY)) {
                        if (p->flags & GP_PAINTFLAG_STROKEADDED) {
-                               gpencil_move_polygon_stroke_to_back(C);
+                               gpencil_move_last_stroke_to_back(C);
                        }
                }
                p->status = GP_STATUS_DONE;
@@ -2430,7 +2430,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
                                /* if drawing polygon and enable on back, must move stroke */
                                if ((p->scene->toolsettings->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) && (p->paintmode == GP_PAINTMODE_DRAW_POLY)) {
                                        if (p->flags & GP_PAINTFLAG_STROKEADDED) {
-                                               gpencil_move_polygon_stroke_to_back(C);
+                                               gpencil_move_last_stroke_to_back(C);
                                        }
                                }
                                p->status = GP_STATUS_DONE;
@@ -2516,7 +2516,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
                                /* if drawing polygon and enable on back, must move stroke */
                                if ((p->scene->toolsettings->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) && (p->paintmode == GP_PAINTMODE_DRAW_POLY)) {
                                        if (p->flags & GP_PAINTFLAG_STROKEADDED) {
-                                               gpencil_move_polygon_stroke_to_back(C);
+                                               gpencil_move_last_stroke_to_back(C);
                                        }
                                }
                                p->status = GP_STATUS_DONE;