Fix T94089: GPencil Drawing don't Update after paste in Dopesheet
When paste new frames, the datablock need to be tagged to update the drawings.
This commit is contained in:
parent
05ca297596
commit
6ea0ecdc51
Notes:
blender-bot
2023-02-14 05:51:15 +01:00
Referenced by issue #94089, Grease Pencil Drawing don't Update after paste Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -46,6 +46,8 @@
|
|||
|
||||
#include "WM_api.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
||||
|
||||
/* ***************************************** */
|
||||
/* NOTE ABOUT THIS FILE:
|
||||
* This file contains code for editing Grease Pencil data in the Action Editor
|
||||
|
@ -499,6 +501,9 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode)
|
|||
/* unapply offset from buffer-frame */
|
||||
gpfs->framenum -= offset;
|
||||
}
|
||||
|
||||
/* Tag destination datablock. */
|
||||
DEG_id_tag_update(ale->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* clean up */
|
||||
|
|
|
@ -643,6 +643,10 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
|
|||
}
|
||||
}
|
||||
|
||||
/* Grease Pencil needs extra update to refresh the added keyframes. */
|
||||
if (ac.datatype == ANIMCONT_GPENCIL) {
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
|
||||
}
|
||||
/* set notifier that keyframes have changed */
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue