-
Notifications
You must be signed in to change notification settings - Fork 1
/
make.py
executable file
·46 lines (41 loc) · 1.14 KB
/
make.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /usr/bin/env python3
# Import some modules
import os
import sys
# List of scenes
scenes = [
# 'AULogo',
# 'AULogoIntro',
# 'CulpritKnot',
# 'EndScene',
'ThumbNail',
# 'Fig8Determinant',
# 'Isotopy',
# 'KnotColorExample',
# 'KnotCrossingsExample',
# 'KnotExample',
# 'KnotNotation',
# 'KnotTable',
# 'LordKelvin',
# 'ReidemeisterColor',
# 'ReidemeisterMoves',
# 'StartingQuote',
# 'TrefoilFig8Colorability',
# 'TrefoilToFigureEight',
# 'Tricolorability',
# 'VideoIntro',
]
# Find the current path, then combine that with the manim folder and the manim.py executable
manim_path = os.path.join(os.path.dirname(os.path.abspath( __file__ )), 'manim', 'manim.py')
# Render each of the scenes
for scene in scenes:
scene_path = os.path.join(os.path.dirname(os.path.abspath( __file__ )), 'scenes', scene + '.py')
# Create the command
command = "python3 %s %s %s" % (manim_path, scene_path, scene)
# Check if any arguments were provided on the command line
if len(sys.argv) > 1:
# Add each of the arguments to the command
for i in range(1, len(sys.argv)):
command = command + " " + sys.argv[i]
# Run the command
os.system(command)