diff --git a/active_projects/uncertainty.py b/active_projects/uncertainty.py index 2c385c8c..1af18595 100644 --- a/active_projects/uncertainty.py +++ b/active_projects/uncertainty.py @@ -1727,7 +1727,7 @@ class IntroduceDopplerRadar(Scene): words = ["Original signal", "Echo"] for graph, word in zip([pulse_graph, echo_graph], words): arrow = Vector(DOWN) - arrow.next_to(graph.peak_point, UP, SMALL_BUFF) + arrow.next_to(graph.peak_point, UP, MED_SMALL_BUFF) arrow.match_color(graph) graph.arrow = arrow label = TextMobject(word) @@ -2035,7 +2035,9 @@ class IntroduceDopplerRadar(Scene): sum_graph.background_image_file = "blue_yellow_gradient" return pulse_graph, echo_graph, sum_graph - +class MentionPRFNuance(TeacherStudentsScene): + def construct(self): + pass diff --git a/extract_scene.py b/extract_scene.py index 0d21e8a7..cec13bdf 100644 --- a/extract_scene.py +++ b/extract_scene.py @@ -95,6 +95,7 @@ def get_configuration(): "save_pngs" : args.save_pngs, #If -t is passed in (for transparent), this will be RGBA "saved_image_mode": "RGBA" if args.transparent else "RGB", + "movie_file_extension" : ".mov" if args.transparent else ".mp4", "quiet" : args.quiet or args.write_all, "ignore_waits" : args.preview, "write_all" : args.write_all, @@ -237,6 +238,7 @@ def main(): "write_to_movie", "output_directory", "save_pngs", + "movie_file_extension", "start_at_animation_number", "end_at_animation_number", ] diff --git a/mobject/vectorized_mobject.py b/mobject/vectorized_mobject.py index a3ac3372..0e4cb237 100644 --- a/mobject/vectorized_mobject.py +++ b/mobject/vectorized_mobject.py @@ -54,10 +54,14 @@ class VMobject(Mobject): if fill_opacity is not None: self.fill_opacity = fill_opacity if family: - kwargs = locals() - kwargs.pop("self") for mob in self.submobjects: - mob.set_style_data(**kwargs) + mob.set_style_data( + stroke_color = stroke_color, + stroke_width = stroke_width, + fill_color = fill_color, + fill_opacity = fill_opacity, + family = family + ) return self def set_fill(self, color = None, opacity = None, family = True): diff --git a/scene/scene.py b/scene/scene.py index fda15aaf..09c6ffa1 100644 --- a/scene/scene.py +++ b/scene/scene.py @@ -380,7 +380,7 @@ class Scene(Container): animations.pop() #method should already have target then. else: - mobject.target = mobject.deepcopy() + mobject.generate_target() # if len(state["method_args"]) > 0 and isinstance(state["method_args"][-1], dict): method_kwargs = state["method_args"].pop() @@ -570,18 +570,23 @@ class Scene(Container): FFMPEG_BIN, '-y', # overwrite output file if it exists '-f', 'rawvideo', - '-vcodec','rawvideo', '-s', '%dx%d'%(width, height), # size of one frame '-pix_fmt', 'rgba', '-r', str(fps), # frames per second '-i', '-', # The imput comes from a pipe '-an', # Tells FFMPEG not to expect any audio - '-vcodec', 'mpeg', - '-c:v', 'libx264', - '-pix_fmt', 'yuv420p', '-loglevel', 'error', - temp_file_path, ] + if self.movie_file_extension == ".mov": + # This is if the background of the exported video + # should be transparent. + command += ['-vcodec', 'png'] + else: + command += [ + '-c:v', 'libx264', + '-pix_fmt', 'yuv420p', + ] + command += [temp_file_path] # self.writing_process = sp.Popen(command, stdin=sp.PIPE, shell=True) self.writing_process = sp.Popen(command, stdin=sp.PIPE) diff --git a/topics/light.py b/topics/light.py index 67f1458c..9ba8d75c 100644 --- a/topics/light.py +++ b/topics/light.py @@ -537,7 +537,7 @@ class Spotlight(VMobject): new_submob = self.new_sector(submob.inner_radius,dr,lower_angle,upper_angle) submob.points = new_submob.points submob.set_fill(opacity = 10 * self.opacity_function(submob.outer_radius)) - print "new opacity:", self.opacity_function(submob.outer_radius) + # print "new opacity:", self.opacity_function(submob.outer_radius)