Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linked Cel Refactor and Timeline Refactor Tweaks #764

Merged
merged 35 commits into from
Oct 16, 2022

Conversation

mrtripie
Copy link
Contributor

@mrtripie mrtripie commented Oct 7, 2022

Implemented #719

  • New concept of a "link set":
    • Layer's linked_cels array of Frames was replaced with a cel_link_sets array of array of Cels
      • Each inner array represents a "link set", allowing for a single layer to have multiple different sets of linked cels
      • The Frames were changed to Cels which makes certain things easier and others harder, but I think makes more sense
    • Each Cel has a reference to its link_set array, if linked, or null if not
    • The linked cel indicator on Cel Buttons is now a different hue depending on the index of the Cel's link_set inside the Layer's cel_link_sets array.
      • An issue with this is that when a link sets are added/removed to cel_link_sets, other link_set's hue will change. (and when undoing and its removed/added back it will likely be a different color than before)
        • If it seems worth it, this could be solved by representing link sets with a simple class or Dictionary containing an Array and hue float, and setting automatically the hue of the link set when its created.
  • Linked Cel data was moved from PixelLayer to BaseLayer to make it simpler for multiple layer types
  • Deleted Project.duplicate_layers()
  • Enabled drag and drop to move/swap linked cels on the same layer
  • Can now link/unlink multiple cels at a time
  • Enabling new_cels_linked no longer links the current frame's Cel
  • When new_cels_linked is enabled, new Cels will be linked to previous frame's Cel (the Cel to the left of the new one)
  • Updated the tooltip for PixelLayerButton's LinkButton to be more accurate (it doesn't enable/disable Cel linking, it enables/disables automatic linking of new Cels when creating a new frame)

Timeline Refactor Tweaks:

  • Rewrote the copy methods on BaseLayer to use get/set_content, as they now should work on any layer type (without overriding) and are only used in one place, removed the methods and inlined where used)
  • Added a texture argument to set_content

Other:

  • Bug fixes from my timeline refactor
  • General cleanup

MrTriPie added 30 commits October 7, 2022 11:02
…s the first part of that method was the same)
…ator, as it wasn't enough to improve visibility of selection
…use when deserializing, and otherwise helpful
@mrtripie mrtripie changed the title Linked Cel Refactor Linked Cel Refactor and Timeline Refactor Tweaks Oct 14, 2022
@mrtripie mrtripie marked this pull request as ready for review October 14, 2022 19:36
msgstr ""

msgid "Unlink Cel"
msgid "Unlink Selected Cels"
Copy link
Member

Choose a reason for hiding this comment

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

Is this string used somewhere? Shouldn't this be "Link Cels to"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its inside the right click menu on cel buttons.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, it seems like this got messed up somehow, I'll update it in a minute

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be fixed now

Copy link
Member

@OverloadedOrama OverloadedOrama left a comment

Choose a reason for hiding this comment

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

Looks good to me. I tested it too and couldn't find any issues, so it should be good to merge. Thank you!

@OverloadedOrama OverloadedOrama merged commit 637662d into Orama-Interactive:master Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants