Skip to content

Commit

Permalink
Fix for screenshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Jun 6, 2024
1 parent 6e694e5 commit 27b35fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion brainrender/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,13 @@ def render(

# Get camera
camera = camera or settings.DEFAULT_CAMERA
reset_cam = True
if isinstance(camera, str):
camera = get_camera(camera)
else:
camera = check_camera_param(camera)
# Don't reset the camera if custom dict is passed
reset_cam = False

if "focal_point" not in camera.keys() or camera["focal_point"] is None:
camera["focal_point"] = self.root._mesh.center_of_mass()
Expand Down Expand Up @@ -266,7 +269,7 @@ def render(
bg=settings.BACKGROUND_COLOR,
rate=40,
axes=self.plotter.axes,
resetcam=False,
resetcam=reset_cam,
)
elif self.backend == "k3d": # pragma: no cover
# Remove silhouettes
Expand Down

0 comments on commit 27b35fc

Please sign in to comment.