You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some thoughts I had about linked cels when working on refactoring the timeline.
It seems like it would be useful to be able to have more than one group of linked cels per layer.
My timeline refactor project (part of #698) adds the add_frames and remove_frames methods to Project which are supposed to be reversible with each other for undo/redo purposes. The way that linked cels currently works makes it not easily reversible in these methods, meaning they still have to be set in AnimationTimeline's add_frame, delete_frames, and copy_frames methods, adding some complexity and code duplication there.
How this might work:
Each linked cel group would be represented by its own Array (or maybe a simple class with an array) stored in PixelLayer's linked_cel array (probably renamed to linked_cel_groups)
To make it so that linked cels would be reversible when calling Project.add_frame and remove_frame the cel's themselves need to know if they're linked, so they would get a reference to the linked cel group they're in (if any)
When calling Project.add_frames, any cels that are in the frame with a reference to its cel group will be added to that cel group on the layer (if the layer doesn't have the group, the group will be added too)
When calling Project.remove_frames, any cels that are in a cel group will be removed from that group (and the group will be removed from the layer if empty), the cel will keep a reference to the group in case the user presses undo, which will add the cel back to the group in Project.add_frames.
Linked cel groups could be indicated by cycling the hue of the linked indicator square on the cel buttons.
Choosing which cels get linked to which cels:
One way that might work for choosing a cel to link to would be to press link in the cel right click menu, use and Control.force_drag to start a drag and drop where the user can pick a cel to link to.
This may have a problem with cel buttons that are currently off screen (ie: trying to link the cels on the first and last frames on an animation with many frames)
Another way is based on which cels are linked in that layer. Right click a cel > link and all cels will link to the cel you right clicked on.
I think the new cels linked mode on layers should be changed to not link the current cel automatically. When you add a new frame, the cel in the frame before it will get added to a new link group if its not already in one, and the new cel will be added to the same link group as it.
On a side note, I think the tooltip for that button needs to be changed, it's not accurate
Some possible side effects:
This may also make it so that moving/swapping linked cels can become supported without adding any logic to update the linked_cels array in PixelLayer
I think Project.duplicate_layers will be safe to remove after this
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Here are some thoughts I had about linked cels when working on refactoring the timeline.
It seems like it would be useful to be able to have more than one group of linked cels per layer.
My timeline refactor project (part of #698) adds the add_frames and remove_frames methods to Project which are supposed to be reversible with each other for undo/redo purposes. The way that linked cels currently works makes it not easily reversible in these methods, meaning they still have to be set in AnimationTimeline's add_frame, delete_frames, and copy_frames methods, adding some complexity and code duplication there.
How this might work:
Each linked cel group would be represented by its own Array (or maybe a simple class with an array) stored in PixelLayer's linked_cel array (probably renamed to linked_cel_groups)
To make it so that linked cels would be reversible when calling Project.add_frame and remove_frame the cel's themselves need to know if they're linked, so they would get a reference to the linked cel group they're in (if any)
When calling Project.add_frames, any cels that are in the frame with a reference to its cel group will be added to that cel group on the layer (if the layer doesn't have the group, the group will be added too)
When calling Project.remove_frames, any cels that are in a cel group will be removed from that group (and the group will be removed from the layer if empty), the cel will keep a reference to the group in case the user presses undo, which will add the cel back to the group in Project.add_frames.
Linked cel groups could be indicated by cycling the hue of the linked indicator square on the cel buttons.
Choosing which cels get linked to which cels:
I think the new cels linked mode on layers should be changed to not link the current cel automatically. When you add a new frame, the cel in the frame before it will get added to a new link group if its not already in one, and the new cel will be added to the same link group as it.
Some possible side effects:
Beta Was this translation helpful? Give feedback.
All reactions