[Bf-blender-cvs] [90d7dcfe2fb] greasepencil-object: Fix drawing segment fault when hide colors

Antonio Vazquez noreply at git.blender.org
Thu Jun 22 12:55:56 CEST 2017


Commit: 90d7dcfe2fb478dd755274ce4462c5c05da93c83
Author: Antonio Vazquez
Date:   Thu Jun 22 12:55:38 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB90d7dcfe2fb478dd755274ce4462c5c05da93c83

Fix drawing segment fault when hide colors

The batch cache must be set to dirty for all GP Objects and not only current one.

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

M	source/blender/blenkernel/intern/gpencil.c
M	source/blender/editors/sculpt_paint/paint_ops.c

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

diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index e47c371acef..18abedd7b3e 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -1329,6 +1329,7 @@ void BKE_gpencil_palettecolor_delete_allstrokes(PaletteColor *palcolor)
 				}
 			}
 		}
+		BKE_gpencil_batch_cache_dirty(gpd);
 	}
 }
 
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index c3e002ac378..f32a9697b3c 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -280,6 +280,7 @@ static int palette_lock_layer_exec(bContext *C, wmOperator *UNUSED(op))
 		}
 	}
 	/* notifiers */
+	BKE_gpencil_batch_cache_dirty(gpd);
 	WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
 	return OPERATOR_FINISHED;
@@ -432,6 +433,7 @@ static int palettecolor_isolate_exec(bContext *C, wmOperator *op)
 	}
 
 	/* notifiers */
+	BKE_gpencil_batch_cache_alldirty();
 	WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
 	return OPERATOR_FINISHED;




More information about the Bf-blender-cvs mailing list