Skip to content

Commit dbced6e

Browse files
authored
fix(lib): pass skip argument to ManimCE (#524)
* fix(lib): pass skip argument to ManimCE * fix(lint): make ruff happy
1 parent 941b895 commit dbced6e

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
(unreleased)=
1111
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/v5.4.1...HEAD)
1212

13+
(unreleased-fixed)=
14+
### Fixed
15+
16+
- Fixed `start_skip_animations` to actually pass argument to ManimCE,
17+
otherwise video animations were still rendered, just excluded from
18+
the final output.
19+
[#524](https://github.com/jeertmans/manim-slides/pull/524)
20+
1321
(v5.4.1)=
1422
## [v5.4.1](https://github.com/jeertmans/manim-slides/compare/v5.4.0...v5.4.1)
1523

manim_slides/slide/base.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,7 @@ def start_skip_animations(self) -> None:
594594
self._skip_animations = True
595595

596596
def stop_skip_animations(self) -> None:
597-
"""
598-
Stop skipping animations.
599-
"""
597+
"""Stop skipping animations."""
600598
self._skip_animations = False
601599

602600
def wipe(

manim_slides/slide/manim.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ def next_slide(
127127
**kwargs: Any,
128128
) -> None:
129129
Scene.next_section(
130-
self, *args, skip_animations=base_slide_config.skip_animations, **kwargs
130+
self,
131+
*args,
132+
skip_animations=base_slide_config.skip_animations | self._skip_animations,
133+
**kwargs,
131134
)
132135
BaseSlide.next_slide.__wrapped__(
133136
self,

tests/test_base_slide.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ def test_wait_time_between_slides(self, base_slide: BaseSlide) -> None:
8787
assert base_slide.wait_time_between_slides == 0.0
8888

8989
def test_skip_animations(self, base_slide: BaseSlide) -> None:
90-
assert base_slide._skip_animations == False
90+
assert not base_slide._skip_animations
9191

9292
def test_start_and_stop_skip_animations(self, base_slide: BaseSlide) -> None:
9393
base_slide.start_skip_animations()
94-
assert base_slide._skip_animations == True
94+
assert base_slide._skip_animations
9595
base_slide.stop_skip_animations()
96-
assert base_slide._skip_animations == False
96+
assert not base_slide._skip_animations
9797

9898
def test_play(self) -> None:
9999
pass # This method should be tested in test_slide.py

uv.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)