[Bf-blender-cvs] [310f1b05792] blender2.8: GP: Fix unreported change material operator error
Antonioya
noreply at git.blender.org
Wed Sep 26 15:49:54 CEST 2018
Commit: 310f1b057926d6250adf11db6621f2606b61827f
Author: Antonioya
Date: Wed Sep 26 15:49:46 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB310f1b057926d6250adf11db6621f2606b61827f
GP: Fix unreported change material operator error
The first material of the list could not be assigned.
===================================================================
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 07bb0141e95..7932f6308a6 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -1371,7 +1371,7 @@ static int gp_stroke_change_color_exec(bContext *C, wmOperator *op)
}
/* try to find slot */
int idx = BKE_gpencil_get_material_index(ob, ma) - 1;
- if (idx <= 0) {
+ if (idx < 0) {
return OPERATOR_CANCELLED;
}
More information about the Bf-blender-cvs
mailing list