Group Layer Tree Matching and Linked Cel Texture Extraction#28
Merged
AristurtleDev merged 2 commits intoAristurtleDev:mainfrom May 2, 2024
Merged
Group Layer Tree Matching and Linked Cel Texture Extraction#28AristurtleDev merged 2 commits intoAristurtleDev:mainfrom
AristurtleDev merged 2 commits intoAristurtleDev:mainfrom
Conversation
AristurtleDev
approved these changes
May 2, 2024
Owner
|
Thanks @exokem, I agree, the extraction from the LinkedCel is a better experience for the consumer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request includes two relatively minor changes. One for the assignment of layers as children to group layers, and another for the extraction of textures from linked cels.
1. Group Layer Child Assignment
Previously, layers would always be added as children to the last-read group layer, regardless of their level relative to that group. As a result, layer structures like this:
could end up looking more like this at runtime:
This PR introduces a change that caches one last-read group layer per level. With this change, layers will be added to the last-read group layer whose level is one less than theirs, if such a group layer has previously been read. This should at least ensure that the actual hierarchy is preserved in more cases.
2. Linked Cel Texture Extraction
This PR also adds a simple check for linked cels in the
ExtractCelextension for theAsepriteCelclass.Instead of throwing an exception for instances of the
AsepriteLinkedCelclass, the extension will now extract the texture from the cel that a linked cel is linked to. While it is true that linked cels do not contain pixel data, the extension is more useful if automatically resolves the actual cel reference.