Skip to content

Commit a2b277b

Browse files
authored
Merge pull request #281 from ManimCommunity/fix_fixed_frame_method
# Changes in camera.py to fix fixed frame option in 3D
2 parents 4cc014c + 0525f64 commit a2b277b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

manim/camera/camera.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def extract_mobject_family_members(self, mobjects, only_those_with_points=False)
414414
else:
415415
method = Mobject.get_family
416416
if self.use_z_index:
417-
mobjects.sort(key=lambda m: m.z_index)
417+
mobjects = sorted(mobjects, key=lambda m: m.z_index)
418418
return remove_list_redundancies(list(it.chain(*[method(m) for m in mobjects])))
419419

420420
def get_mobjects_to_display(
@@ -439,7 +439,7 @@ def get_mobjects_to_display(
439439
"""
440440
if include_submobjects:
441441
mobjects = self.extract_mobject_family_members(
442-
mobjects, only_those_with_points=True,
442+
mobjects, only_those_with_points=True
443443
)
444444
if excluded_mobjects:
445445
all_excluded = self.extract_mobject_family_members(excluded_mobjects)
@@ -974,9 +974,7 @@ def overlay_rgba_array(self, pixel_array, new_array):
974974
new_array : np.array
975975
The new pixel array to overlay.
976976
"""
977-
self.overlay_PIL_image(
978-
pixel_array, self.get_image(new_array),
979-
)
977+
self.overlay_PIL_image(pixel_array, self.get_image(new_array))
980978

981979
def overlay_PIL_image(self, pixel_array, image):
982980
"""Overlays a PIL image on the passed pixel array.
@@ -1092,9 +1090,9 @@ def adjusted_thickness(self, thickness):
10921090
"""
10931091
# TODO: This seems...unsystematic
10941092
big_sum = op.add(
1095-
camera_config["default_pixel_height"], camera_config["default_pixel_width"],
1093+
camera_config["default_pixel_height"], camera_config["default_pixel_width"]
10961094
)
1097-
this_sum = op.add(self.get_pixel_height(), self.get_pixel_width(),)
1095+
this_sum = op.add(self.get_pixel_height(), self.get_pixel_width())
10981096
factor = fdiv(big_sum, this_sum)
10991097
return 1 + (thickness - 1) / factor
11001098

0 commit comments

Comments
 (0)