这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@J5lx
Copy link
Member

@J5lx J5lx commented Feb 13, 2023

As reported by Nelphy on Discord. I also thought about renaming loadKey()… fundamentally, it’s more general-purpose than what we’re using it for so far IMO.

In the future, I think we should reconsider how we enforce the “min. one keyframe per layer” requirement. It’s a bit inconsistent right now with different assumptions made in different places, which is fundamentally what led to this issue.

@J5lx J5lx added this to the v0.6.7 milestone Feb 13, 2023
@MrStevns
Copy link
Member

Agreed, the min 1 keyframe per layer is a mess and causes all kinds of problems.

There are also problems with simply removing it, because the undo stack is not notified (nor should it because you as a user didn't cause the action), yet you want to restore the data on the frame later, making it tricky to recover without having logic split several places.
This will probably first surface when we get proper undo/redo support

@MrStevns MrStevns self-assigned this Feb 13, 2023
@J5lx
Copy link
Member Author

J5lx commented Feb 16, 2023

I added the new function you suggested. I’m not sure I entirely understand your comment about the undo stack, though. Are you saying that we should pay attention to this when we eventually add proper undo/redo support or to adjust the current system in some way?

Copy link
Member

@MrStevns MrStevns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@MrStevns
Copy link
Member

Are you saying that we should pay attention to this when we eventually add proper undo/redo support or to adjust the current system in some way?

It was just a note that I felt like adding at the time, but yes I suspect that we'll have to make changes to make the undo/redo system work properly when that time come. I didn't mean that we should adjust it to the current system. The less places and more consistent we can make the min 1 keyframe pr layer, the better.

I will merge the PR now, thanks for your work 😄

@MrStevns MrStevns merged commit 6ab908a into pencil2d:master Feb 16, 2023
@J5lx J5lx deleted the fixes/duplicated-layer-empty-frame branch February 16, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants