Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformatting the --save_sections output to have the format <Scene>_<SecNum>_<SecName><extension> #3499

Merged
merged 6 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manim/scene/scene_file_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def next_section(self, name: str, type: str, skip_animations: bool) -> None:
and not skip_animations
):
# relative to index file
section_video = f"{self.output_name}_{len(self.sections):04}{config.movie_file_extension}"
section_video = f"{self.output_name}_{len(self.sections):04}_{name}{config.movie_file_extension}"

self.sections.append(
Section(
Expand Down
4 changes: 2 additions & 2 deletions tests/control_data/videos_data/SceneWithEnabledSections.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
},
"section_dir_layout": [
"SquareToCircle.json",
"SquareToCircle_0000.mp4",
"SquareToCircle_0000_autocreated.mp4",
"."
],
"section_index": [
{
"name": "autocreated",
"type": "default.normal",
"video": "SquareToCircle_0000.mp4",
"video": "SquareToCircle_0000_autocreated.mp4",
"codec_name": "h264",
"width": 854,
"height": 480,
Expand Down
20 changes: 10 additions & 10 deletions tests/control_data/videos_data/SceneWithSections.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
},
"section_dir_layout": [
"SceneWithSections.json",
"SceneWithSections_0004.mp4",
"SceneWithSections_0003.mp4",
"SceneWithSections_0002.mp4",
"SceneWithSections_0001.mp4",
"SceneWithSections_0000.mp4",
"SceneWithSections_0004_unnamed.mp4",
"SceneWithSections_0003_Prepare For Unforeseen Consequences..mp4",
"SceneWithSections_0002_test.mp4",
"SceneWithSections_0001_unnamed.mp4",
"SceneWithSections_0000_autocreated.mp4",
"."
],
"section_index": [
{
"name": "autocreated",
"type": "default.normal",
"video": "SceneWithSections_0000.mp4",
"video": "SceneWithSections_0000_autocreated.mp4",
"codec_name": "h264",
"width": 854,
"height": 480,
Expand All @@ -32,7 +32,7 @@
{
"name": "unnamed",
"type": "default.normal",
"video": "SceneWithSections_0001.mp4",
"video": "SceneWithSections_0001_unnamed.mp4",
"codec_name": "h264",
"width": 854,
"height": 480,
Expand All @@ -43,7 +43,7 @@
{
"name": "test",
"type": "default.normal",
"video": "SceneWithSections_0002.mp4",
"video": "SceneWithSections_0002_test.mp4",
"codec_name": "h264",
"width": 854,
"height": 480,
Expand All @@ -54,7 +54,7 @@
{
"name": "Prepare For Unforeseen Consequences.",
"type": "default.normal",
"video": "SceneWithSections_0003.mp4",
"video": "SceneWithSections_0003_Prepare For Unforeseen Consequences..mp4",
"codec_name": "h264",
"width": 854,
"height": 480,
Expand All @@ -65,7 +65,7 @@
{
"name": "unnamed",
"type": "presentation.skip",
"video": "SceneWithSections_0004.mp4",
"video": "SceneWithSections_0004_unnamed.mp4",
"codec_name": "h264",
"width": 854,
"height": 480,
Expand Down
12 changes: 6 additions & 6 deletions tests/control_data/videos_data/SceneWithSkipAnimations.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
},
"section_dir_layout": [
"ElaborateSceneWithSections.json",
"ElaborateSceneWithSections_0003.mp4",
"ElaborateSceneWithSections_0001.mp4",
"ElaborateSceneWithSections_0000.mp4",
"ElaborateSceneWithSections_0003_fade out.mp4",
"ElaborateSceneWithSections_0001_transform to circle.mp4",
"ElaborateSceneWithSections_0000_create square.mp4",
"."
],
"section_index": [
{
"name": "create square",
"type": "default.normal",
"video": "ElaborateSceneWithSections_0000.mp4",
"video": "ElaborateSceneWithSections_0000_create square.mp4",
"codec_name": "h264",
"width": 854,
"height": 480,
Expand All @@ -30,7 +30,7 @@
{
"name": "transform to circle",
"type": "default.normal",
"video": "ElaborateSceneWithSections_0001.mp4",
"video": "ElaborateSceneWithSections_0001_transform to circle.mp4",
"codec_name": "h264",
"width": 854,
"height": 480,
Expand All @@ -41,7 +41,7 @@
{
"name": "fade out",
"type": "default.normal",
"video": "ElaborateSceneWithSections_0003.mp4",
"video": "ElaborateSceneWithSections_0003_fade out.mp4",
"codec_name": "h264",
"width": 854,
"height": 480,
Expand Down
Loading