[Bf-blender-cvs] [2a63622] master: GPencil: Cleanup change color operator
Antonioya
noreply at git.blender.org
Sat Aug 27 12:53:10 CEST 2016
Commit: 2a6362255d8d0e1c5fd2c20495a76ceddaa8dbc8
Author: Antonioya
Date: Sat Aug 27 12:52:30 2016 +0200
Branches: master
https://developer.blender.org/rB2a6362255d8d0e1c5fd2c20495a76ceddaa8dbc8
GPencil: Cleanup change color operator
It is faster to assign the color to the pointer instead to force the new
lookup in drawing function.
===================================================================
M source/blender/editors/gpencil/gpencil_data.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 83dc0b6..9560ab1 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -879,9 +879,9 @@ static int gp_stroke_change_color_exec(bContext *C, wmOperator *UNUSED(op))
continue;
/* asign new color (only if different) */
- if (STREQ(gps->colorname, color->info) == false) {
+ if ((STREQ(gps->colorname, color->info) == false) || (gps->palcolor != color)) {
BLI_strncpy(gps->colorname, color->info, sizeof(gps->colorname));
- gps->flag |= GP_STROKE_RECALC_COLOR;
+ gps->palcolor = color;
}
}
}
More information about the Bf-blender-cvs
mailing list