Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFalk David <falkdavid@gmx.de>2022-07-07 17:36:21 +0300
committerFalk David <falkdavid@gmx.de>2022-08-23 14:53:44 +0300
commit60e2dfd1e84e78cd3d182c94e0548869d6108351 (patch)
treed6debc6c98b8d438ab425d0931b8aaddc04f69d3 /source/blender/makesrna
parent511ff898da09e38bc57144f8b1d94e48cb85aeb6 (diff)
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
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c1
1 files changed, 1 insertions, 0 deletions
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");