Skip to content

one-liner#641

Merged
TheJeran merged 1 commit intomainfrom
jp/cancel-anim-export
May 10, 2026
Merged

one-liner#641
TheJeran merged 1 commit intomainfrom
jp/cancel-anim-export

Conversation

@TheJeran
Copy link
Copy Markdown
Collaborator

Quick oneliner to turn off animation in case it is on during export

closes #638

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the export logic in src/utils/ExportCanvas.tsx to disable plot animations during the export process. The feedback suggests that the animation state should be captured and restored after the export completes to maintain the user's UI settings, consistent with how other export parameters are managed.

}
SetCamera(true);
if (animate){
usePlotStore.setState({animate:false}) // Disable animation if currently active
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

While disabling the plot animation during export is necessary to prevent conflicts with the manual frame-stepping logic, the original state of animate should be captured and restored once the export process completes.

Currently, if a user has animation enabled in the UI, it will remain disabled after the export finishes. This should be handled similarly to how quality (line 252/487) and DPR (line 253/488) are managed: capture the original value at the start of the useEffect and restore it in both the Animate().then() block and the static export else block.

Suggested change
usePlotStore.setState({animate:false}) // Disable animation if currently active
usePlotStore.setState({ animate: false }) // Disable animation if currently active

@TheJeran TheJeran merged commit 456245f into main May 10, 2026
6 checks passed
@TheJeran TheJeran deleted the jp/cancel-anim-export branch May 10, 2026 06:46
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.

Animation controls interfere with video export

1 participant