Commit: 0edb771ad5894a3e9948d16c10519535ab378cdd
Author: Falk David
Date: Wed Feb 2 11:48:44 2022 +0100
Branches: greasepencil-object
https://developer.blender.org/rB0edb771ad5894a3e9948d16c10519535ab378cdd
Add light updates to layers in the rna update
===================================================================
M source/blender/makesrna/intern/rna_gpencil.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_gpencil.c
b/source/blender/makesrna/intern/rna_gpencil.c
index 7ef2f757cd8..98255a46ae7 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -172,6 +172,7 @@ static const EnumPropertyItem
rna_enum_gpencil_caps_modes_items[] = {
# include "BKE_gpencil.h"
# include "BKE_gpencil_curve.h"
# include "BKE_gpencil_geom.h"
+# include "BKE_gpencil_update_cache.h"
# include "BKE_icons.h"
# include "DEG_depsgraph.h"
@@ -179,6 +180,10 @@ static const EnumPropertyItem
rna_enum_gpencil_caps_modes_items[] = {
static void rna_GPencil_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
PointerRNA *ptr)
{
+ /* In case a property on a layer changed, tag it with a light update. */
+ if (ptr->type == &RNA_GPencilLayer) {
+ BKE_gpencil_tag_light_update((bGPdata *)(ptr->owner_id), (bGPDlayer
*)(ptr->data), NULL, NULL);
+ }
DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs