Manim: Recompilation of file takes into account previous partial movie files

Created on 26 Jul 2020  路  1Comment  路  Source: ManimCommunity/manim

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 :

Version 1

from manim import *


class TestPartialsScene(Scene):
    def construct(self):
        square = Square()
        self.play(FadeIn(square))
        self.wait()
        self.play(FadeOut(square))

Version 2

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 :

  • square FadeIn
  • wait
  • square FadeOut

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 :

  • triangle FadeIn
  • wait

However, the current result is that the third partial movie of the first version is kept and the clip goes as follow :

  • triangle FadeIn
  • wait
  • square FadeOut

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.

bug

Most helpful comment

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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nilaybhatia picture nilaybhatia  路  6Comments

kolibril13 picture kolibril13  路  5Comments

PgBiel picture PgBiel  路  5Comments

ackxolotl picture ackxolotl  路  4Comments

nilaybhatia picture nilaybhatia  路  7Comments