From 90a7ca7ed058741f4c07ccfc89685a31d063b2cf Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 20 Nov 2023 10:07:19 +0100 Subject: [PATCH] GPv3: Cleanup style and change depsgraph tag --- .../editors/grease_pencil/intern/grease_pencil_material.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_material.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_material.cc index c08ee0d4443..ab33b4e0319 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_material.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_material.cc @@ -32,15 +32,15 @@ static int grease_pencil_material_reveal_exec(bContext *C, wmOperator * /*op*/) bool changed = false; for (const int i : IndexRange(object->totcol)) { if (Material *ma = BKE_gpencil_material(object, i + 1)) { - MaterialGPencilStyle *gp_style = ma->gp_style; - gp_style->flag &= ~GP_MATERIAL_HIDE; + MaterialGPencilStyle &gp_style = *ma->gp_style; + gp_style.flag &= ~GP_MATERIAL_HIDE; DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE); changed = true; } } if (changed) { - DEG_id_tag_update(&grease_pencil.id, ID_RECALC_GEOMETRY); + DEG_id_tag_update(&grease_pencil.id, ID_RECALC_SHADING); WM_event_add_notifier(C, NC_GEOM | ND_DATA | NA_EDITED, &grease_pencil); }