Commit: 5fb4f472da01245a9b5608ce5481f8f11b18970b
Author: Antonioya
Date:   Thu Dec 13 14:12:40 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB5fb4f472da01245a9b5608ce5481f8f11b18970b

GP: Cleanup inverse loops

Why use inverse loops when we can use normal loops.

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

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 2a00fd30dbb..dd18c1da632 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -631,14 +631,14 @@ static void gp_primitive_update_strokes(bContext *C, 
tGPDprimitive *tgpi)
                }
 
                if (!found_depth) {
-                       for (i = gps->totpoints - 1; i >= 0; i--) {
+                       for (i = 0; i < gps->totpoints; i++) {
                                depth_arr[i] = 0.9999f;
                        }
                }
                else {
                        /* if all depth are too high disable */
                        bool valid_depth = false;
-                       for (i = gps->totpoints - 1; i >= 0; i--) {
+                       for (i = 0; i < gps->totpoints; i++) {
                                if (depth_arr[i] < 0.9999f) {
                                        valid_depth = true;
                                        break;

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

Reply via email to