Add a utility to copy Inochi Session bindings from different versions of the same puppet.#111
Open
ArcturusEmrys wants to merge 3 commits intoInochi2D:mainfrom
Open
Add a utility to copy Inochi Session bindings from different versions of the same puppet.#111ArcturusEmrys wants to merge 3 commits intoInochi2D:mainfrom
ArcturusEmrys wants to merge 3 commits intoInochi2D:mainfrom
Conversation
This requires having a JSON form of the puppet data, and we don't have a function to convert `Puppet` into that yet. So instead, I added another function to read an INP into JSON ONLY and not convert it into a Puppet.
Member
|
Seems like you have some TODOs, is your PR a draft? Small thing, I'd prefer every comment have a space after the |
…ible with the puppet they are being copied to before saving.
Contributor
Author
|
@Speykious I updated this PR as you requested. It now also has code to parse the Session parameter bindings block enough to where it can validate that it's copying bindings that are compatible with the target puppet. |
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.
Inochi Session uses a vendor block to store its own mappings. Inochi Creator is completely unaware of these mappings and exports a blank file each time, and Inochi Session does not offer a way to copy bindings. This results in me having to hand-copy about 40 parameters every time I export a version of myself.
This PR adds an example script that automates copying Session's mappings to newer versions of the same puppet. This has dramatically improved my ability to add to and tweak my model.
(NOTE: Inochi Session's parameter mappings are called bindings internally, even though the INP format already has a thing called bindings. For the purpose of disambiguation, I'm calling Inochi Session's bindings "mappings".)