mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 22:13:30 +08:00
More intuitive behavior when explicit filenames are provided with extensions
This commit is contained in:
@ -689,6 +689,13 @@ class DictAsObject(object):
|
||||
def fdiv(a, b):
|
||||
return np.true_divide(a,b)
|
||||
|
||||
def add_extension_if_not_present(file_name, extension):
|
||||
# This could conceivably be smarter about handling existing differing extensions
|
||||
if(file_name[-len(extension):] != extension):
|
||||
return file_name + extension
|
||||
else:
|
||||
return file_name
|
||||
|
||||
# For debugging purposes
|
||||
|
||||
def print_mobject_family(mob, n_tabs = 0):
|
||||
|
Reference in New Issue
Block a user