[Bf-blender-cvs] [9c1818a4dd1] temp-eevee-next-cryptomatte: Fix T99524: GPencil not updating when frame num is changed

Falk David noreply at git.blender.org
Tue Aug 23 15:09:15 CEST 2022


Commit: 9c1818a4dd1275f6e1614e7222b3df8489eab2fc
Author: Falk David
Date:   Thu Jul 7 16:36:21 2022 +0200
Branches: temp-eevee-next-cryptomatte
https://developer.blender.org/rB9c1818a4dd1275f6e1614e7222b3df8489eab2fc

Fix T99524: GPencil not updating when frame num is changed

When changing the frame_number of a grease pencil frame, the grease
pencil object is not updated correctly. The frame stays where it
previously was.

The fix adds a `property_update` callback to the `frame_number` RNA
property.

Maniphest Tasks: T99524

Reviewed By: antoniov

Differential Revision: https://developer.blender.org/D15394

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

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 6854ce37c94..cf0ff546d41 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1807,6 +1807,7 @@ static void rna_def_gpencil_frame(BlenderRNA *brna)
   /* XXX NOTE: this cannot occur on the same frame as another sketch. */
   RNA_def_property_range(prop, -MAXFRAME, MAXFRAME);
   RNA_def_property_ui_text(prop, "Frame Number", "The frame on which this sketch appears");
+  RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
 
   prop = RNA_def_property(srna, "keyframe_type", PROP_ENUM, PROP_NONE);
   RNA_def_property_enum_sdna(prop, NULL, "key_type");



More information about the Bf-blender-cvs mailing list