[Bf-blender-cvs] [5fb4f472da0] greasepencil-object: GP: Cleanup inverse loops
Antonioya
noreply at git.blender.org
Thu Dec 13 14:12:48 CET 2018
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;
More information about the Bf-blender-cvs
mailing list