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
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 4fe4947ac4 - Show all commits

View File

@ -182,7 +182,7 @@ class Layer : public TreeNode, public ::GreasePencilLayer {
/**
* Should be called whenever the keys in the frames map have changed.
*/
void tag_frame_times_changed();
void tag_frames_map_keys_changed();
};
/**

View File

@ -434,7 +434,7 @@ int Layer::drawing_index_at(int frame) const
return this->frames().lookup(*std::prev(it)).drawing_index;

.as_span() shouldn't be necessary here.

`.as_span()` shouldn't be necessary here.
}
void Layer::tag_frame_times_changed()
void Layer::tag_frames_map_keys_changed()

int frame -> const int frame

`int frame` -> `const int frame`
{
this->sorted_keys_cache_.tag_dirty();
}
@ -1122,11 +1122,11 @@ 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();
int64_t removed = frames.remove_if([last_drawing_index](auto item) {
int64_t frames_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();
if (frames_removed > 0) {
layer->tag_frames_map_keys_changed();
}
}