Skip to content

Resolve "Allow plot functions to dynamically enter or leave animation mode"

This MR addresses #140 (closed) and implements the possibility for ExternalPlotCreator plot functions to dynamically enter or exit animation mode.

Details

  • PlotHelper is now aware of whether animation mode is enabled or not
  • New custom exception types: EnterAnimationMode, ExitAnimationMode (purely for control flow purposes, instead of return values)
  • New PlotHelper methods: enable_animation and disable_animation
    • If invoked in a state where a animation mode change is required, they raise one of the above exception
  • ExternalPlotCreator catches them, adapts animation parameters and then invokes plotting again
  • Error messages are given upon:
    • Missing animation parameters but enable_animation being invoked
    • Repeatedly switching animation modes

Anything to double-check?

  • Error messages ok?
  • Ideas for other things to test?
  • Documentation ok?

Can this MR be accepted?

  • Implementation ready
  • Tests added or adjusted
  • Documentation extended or updated
  • Code quality
  • Ready for merging

Related issues

Closes #140 (closed)

Edited by Utopia Developers

Merge request reports