mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Change fallback directory for pi creature
This commit is contained in:
parent
ccef2485b2
commit
10b9f2224f
1 changed files with 6 additions and 6 deletions
|
@ -57,18 +57,18 @@ class PiCreature(SVGMobject):
|
|||
try:
|
||||
svg_file = os.path.join(
|
||||
PI_CREATURE_DIR,
|
||||
"%s_%s.svg" % (self.file_name_prefix, mode)
|
||||
f"{self.file_name_prefix}_{mode}.svg"
|
||||
)
|
||||
SVGMobject.__init__(self, file_name=svg_file, **kwargs)
|
||||
except Exception:
|
||||
warnings.warn("No %s design with mode %s" %
|
||||
(self.file_name_prefix, mode))
|
||||
# TODO, this needs to change to a different, better directory
|
||||
warnings.warn(f"No {self.file_name_prefix} design with mode {mode}")
|
||||
svg_file = os.path.join(
|
||||
FILE_DIR,
|
||||
os.path.dirname(os.path.realpath(__file__)),
|
||||
os.pardir,
|
||||
"files",
|
||||
"PiCreatures_plain.svg",
|
||||
)
|
||||
SVGMobject.__init__(self, mode="plain", file_name=svg_file, **kwargs)
|
||||
SVGMobject.__init__(self, file_name=svg_file, **kwargs)
|
||||
|
||||
if self.flip_at_start:
|
||||
self.flip()
|
||||
|
|
Loading…
Add table
Reference in a new issue