Repository navigation
Preserve line breaks when offsetting animation expressions - #3849
Open
snowyukitty wants to merge 1 commit into
Open
snowyukitty wants to merge 1 commit into
snowyukitty wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Fixes #3848.
Offset the stored Molang text rather than its export-normalized form. Keep line breaks around adjusted constants and in multi-line return expressions, and leave zero-offset axes untouched. Export normalization remains in
get(). Inversion also preserves operands across CRLF/tab whitespace and handles multi-line returns.Validation from the repository root:
npm run build-webnpm run build-electronnpm run generate-typesAutomated Chromium checks covered position, rotation and scale expressions, LF/CRLF, leading and trailing constants, trailing semicolons, multi-statement returns, pre/post data points, repeated offsets and tiny deltas. A real gizmo drag, undo/redo and an in-memory project codec compile/load round trip retained the edited text. Additional component checks exercised global/local moves, graph dragging, graph actions and the post-value slider. Desktop execution was not tested.
To reproduce, select a position or rotation keyframe and run this in the application console:
The same line break should survive dragging the gizmo. The automated project round-trip check uses an in-memory codec compile/load.