[Bf-blender-cvs] [89b535690c3] blender2.8: GP: Fix select strokes by color error

Antonioya noreply at git.blender.org
Tue Sep 25 18:17:53 CEST 2018


Commit: 89b535690c35a8d9968faa6054a4ce5572bce7c9
Author: Antonioya
Date:   Tue Sep 25 18:06:50 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB89b535690c35a8d9968faa6054a4ce5572bce7c9

GP: Fix select strokes  by color error

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

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 54676c6a1eb..6202720883c 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -2600,7 +2600,7 @@ static int gpencil_color_select_exec(bContext *C, wmOperator *UNUSED(op))
 					continue;
 
 				/* select */
-				if (ob->actcol == gps->mat_nr) {
+				if (ob->actcol == gps->mat_nr + 1) {
 					bGPDspoint *pt;
 					int i;
 
@@ -2612,6 +2612,9 @@ static int gpencil_color_select_exec(bContext *C, wmOperator *UNUSED(op))
 			}
 		}
 	}
+	/* copy on write tag is needed, or else no refresh happens */
+	DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+
 	/* notifiers */
 	WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);



More information about the Bf-blender-cvs mailing list