mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-05-25 16:58:06 +08:00
fix(lib): pass skip argument to ManimCE (#524)
* fix(lib): pass skip argument to ManimCE * fix(lint): make ruff happy
This commit is contained in:
@ -10,6 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
(unreleased)=
|
(unreleased)=
|
||||||
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/v5.4.1...HEAD)
|
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/v5.4.1...HEAD)
|
||||||
|
|
||||||
|
(unreleased-fixed)=
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed `start_skip_animations` to actually pass argument to ManimCE,
|
||||||
|
otherwise video animations were still rendered, just excluded from
|
||||||
|
the final output.
|
||||||
|
[#524](https://github.com/jeertmans/manim-slides/pull/524)
|
||||||
|
|
||||||
(v5.4.1)=
|
(v5.4.1)=
|
||||||
## [v5.4.1](https://github.com/jeertmans/manim-slides/compare/v5.4.0...v5.4.1)
|
## [v5.4.1](https://github.com/jeertmans/manim-slides/compare/v5.4.0...v5.4.1)
|
||||||
|
|
||||||
|
@ -594,9 +594,7 @@ class BaseSlide:
|
|||||||
self._skip_animations = True
|
self._skip_animations = True
|
||||||
|
|
||||||
def stop_skip_animations(self) -> None:
|
def stop_skip_animations(self) -> None:
|
||||||
"""
|
"""Stop skipping animations."""
|
||||||
Stop skipping animations.
|
|
||||||
"""
|
|
||||||
self._skip_animations = False
|
self._skip_animations = False
|
||||||
|
|
||||||
def wipe(
|
def wipe(
|
||||||
|
@ -127,7 +127,10 @@ class Slide(BaseSlide, Scene): # type: ignore[misc]
|
|||||||
**kwargs: Any,
|
**kwargs: Any,
|
||||||
) -> None:
|
) -> None:
|
||||||
Scene.next_section(
|
Scene.next_section(
|
||||||
self, *args, skip_animations=base_slide_config.skip_animations, **kwargs
|
self,
|
||||||
|
*args,
|
||||||
|
skip_animations=base_slide_config.skip_animations | self._skip_animations,
|
||||||
|
**kwargs,
|
||||||
)
|
)
|
||||||
BaseSlide.next_slide.__wrapped__(
|
BaseSlide.next_slide.__wrapped__(
|
||||||
self,
|
self,
|
||||||
|
@ -87,13 +87,13 @@ class TestBaseSlide:
|
|||||||
assert base_slide.wait_time_between_slides == 0.0
|
assert base_slide.wait_time_between_slides == 0.0
|
||||||
|
|
||||||
def test_skip_animations(self, base_slide: BaseSlide) -> None:
|
def test_skip_animations(self, base_slide: BaseSlide) -> None:
|
||||||
assert base_slide._skip_animations == False
|
assert not base_slide._skip_animations
|
||||||
|
|
||||||
def test_start_and_stop_skip_animations(self, base_slide: BaseSlide) -> None:
|
def test_start_and_stop_skip_animations(self, base_slide: BaseSlide) -> None:
|
||||||
base_slide.start_skip_animations()
|
base_slide.start_skip_animations()
|
||||||
assert base_slide._skip_animations == True
|
assert base_slide._skip_animations
|
||||||
base_slide.stop_skip_animations()
|
base_slide.stop_skip_animations()
|
||||||
assert base_slide._skip_animations == False
|
assert not base_slide._skip_animations
|
||||||
|
|
||||||
def test_play(self) -> None:
|
def test_play(self) -> None:
|
||||||
pass # This method should be tested in test_slide.py
|
pass # This method should be tested in test_slide.py
|
||||||
|
Reference in New Issue
Block a user