When running manim on a file twice with the same scene, if the second version of the file has fewer animations than the first version, the old animations that had a higher indexes than the second version are kept.
For example by running twice this file with manim test_issue_partial.py -pl :
from manim import *
class TestPartialsScene(Scene):
def construct(self):
square = Square()
self.play(FadeIn(square))
self.wait()
self.play(FadeOut(square))
from manim import *
class TestPartialsScene(Scene):
def construct(self):
triangle = Triangle()
self.play(FadeIn(triangle))
self.wait()
Normally, three partial movie files should be created for the first version :
Of course deleting the partial movies solves the issue but I am guessing this operation should not be left to the user.
And two for the second version :
However, the current result is that the third partial movie of the first version is kept and the clip goes as follow :
Of course deleting the partial movies solves the issue, but I am guessing it is not an operation that should be left to the user.
In theory there is such a functionnality within manim.
In get_sorted_integer_files (L.31, file_ops.py), when remove_indices_greater_than is set partial movies files with an index to greater than the number of animations are deleted. I don't really know why is it broken.
Anyway, #166 will fix that.
Most helpful comment
In theory there is such a functionnality within manim.
In
get_sorted_integer_files(L.31, file_ops.py), whenremove_indices_greater_thanis set partial movies files with an index to greater than the number of animations are deleted. I don't really know why is it broken.Anyway, #166 will fix that.