Add project export CLI command - #2488
Open
luizzeroxis wants to merge 1 commit into
Open
luizzeroxis wants to merge 1 commit into
luizzeroxis wants to merge 1 commit into
Conversation
|
Download the artifacts for this pull request here: GUI:
CLI: |
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
Add a CLI command to export assets to a project. This allows you to extract existing assets of a data.win and then modify them on disk without having the use the GUI. Usage:
UndertaleModCli project export <project> -s <source> -d <destination> -a <assets glob>(use-vfor a better view).Caveats
This is a bit awkward to do in the code, so it has to import the entire project first before being able to export. Maybe an empty project could be created in code just for this, so it at least doesn't have to load the stuff already in the project (since this is really just to extract assets from the original source, not the current project). You still have to define the destination - it's used when, for example, looking at audiogroups (it uses the destination one). Another problem is that if one asset fails to export for some reason, the whole thing fails. Still I think this is better than nothing.
Notes
I already talking about this on Discord but I do think the project system has to be more abstracted and modularized, you should be able to deal with a project without loading a data file at all, and you shouldn't need to specify a destination until you actually want to save. Changes like that would make this kind of code a lot cleaner.