Initial Grease Pencil 3.0 stage #106848

Merged
Falk David merged 224 commits from filedescriptor/blender:grease-pencil-v3 into main 2023-05-30 11:14:22 +02:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit e38ecf84a7 - Show all commits

View File

@ -1122,9 +1122,12 @@ void GreasePencil::remove_drawing(int index_to_remove)
/* Remove any frame that points to the last drawing. */
for (Layer *layer : this->layers_for_write()) {
blender::Map<int, GreasePencilFrame> &frames = layer->frames_for_write();
frames.remove_if([last_drawing_index](auto item) {
int64_t removed = frames.remove_if([last_drawing_index](auto item) {
return item.value.drawing_index == last_drawing_index;
});
if (removed > 0) {
layer->tag_frame_times_changed();
}
}
/* Shrink drawing array. */