GPv3: Insert grease pencil keyframe from the dopesheet #110649

Merged
Amélie Fondevilla merged 23 commits from amelief/blender:gpv3-insert-keyframe into main 2023-08-02 14:56:24 +02:00
1 changed files with 1 additions and 2 deletions
Showing only changes of commit d92f42eb5c - Show all commits

View File

@ -779,8 +779,7 @@ static void insert_grease_pencil_key(bAnimContext *ac,
GreasePencil *grease_pencil = reinterpret_cast<GreasePencil *>(ale->id);
const int frame_number = ac->scene->r.cfra;
amelief marked this conversation as resolved Outdated

Even if it's a bit longer, I would prefer this to be current_frame_number. Makes the rest more readable imho.

Even if it's a bit longer, I would prefer this to be `current_frame_number`. Makes the rest more readable imho.
const GreasePencilFrame *current_frame = layer->frames().lookup_ptr(frame_number);
if (current_frame != nullptr) {
if (layer->frames().contains(frame_number)) {
/* A frame already exists at the current frame number. */
amelief marked this conversation as resolved Outdated

This comment can be removed with the change suggested above.

This comment can be removed with the change suggested above.
return;
}