[Bf-blender-cvs] [71eda41ae90] greasepencil-object: GPencil: Fix error when apply material in Opacity/Hue and Tint
Antonioya
noreply at git.blender.org
Thu Jul 18 18:08:14 CEST 2019
Commit: 71eda41ae902822f73b3ba4a44f2efd05d9174d5
Author: Antonioya
Date: Thu Jul 18 18:07:56 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rB71eda41ae902822f73b3ba4a44f2efd05d9174d5
GPencil: Fix error when apply material in Opacity/Hue and Tint
===================================================================
M source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
===================================================================
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
index bdab4c083e9..5b5290dc0ff 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
@@ -192,9 +192,8 @@ void gpencil_apply_modifier_material(
BLI_ghash_insert(gh_color, mat->id.name, newmat);
DEG_id_tag_update(&newmat->id, ID_RECALC_COPY_ON_WRITE);
}
- /* Reaasign color index. */
- int idx = BKE_gpencil_object_material_get_index(ob, newmat);
- gps->mat_nr = idx - 1;
+ /* Reassign color index. */
+ gps->mat_nr = BKE_gpencil_object_material_get_index(ob, newmat);
}
else {
/* reuse existing color (but update only first time) */
More information about the Bf-blender-cvs
mailing list