Skip to content

Fix set_to_default_angled_camera_orientation() raising AttributeError - #4704

Merged
chopan050 merged 2 commits into
ManimCommunity:mainfrom
siddhu-pikachu:codex/manim-4472-fix
Jun 16, 2026
Merged

Fix set_to_default_angled_camera_orientation() raising AttributeError#4704
chopan050 merged 2 commits into
ManimCommunity:mainfrom
siddhu-pikachu:codex/manim-4472-fix

Conversation

@siddhu-pikachu

Copy link
Copy Markdown
Contributor

Overview: What does this pull request change?

Fixes ThreeDScene.set_to_default_angled_camera_orientation() so it uses the stored default angled camera orientation kwargs, and adds a regression test for the method.

Motivation and Explanation: Why and how do your changes improve the library?

ThreeDScene.__init__ stores the defaults in self.default_angled_camera_orientation_kwargs, but set_to_default_angled_camera_orientation() was reading self.default_camera_orientation_kwargs, which does not exist.

This caused the method to raise an AttributeError instead of applying the default angled camera orientation. This PR switches the method to the correct attribute and adds a regression test covering both the default theta and a phi override.

Links to added or changed documentation pages

N/A

Further Information and Comments

Issue: #4472

Tested with:

  • .venv/bin/pytest tests/module/scene/test_threed_scene.py -q -n0

@chopan050 chopan050 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for this fix!

@chopan050 chopan050 changed the title Fix default angled camera orientation in ThreeDScene Fix ThreeDScene.set_to_default_angled_camera_orientation() Jun 16, 2026
@chopan050
chopan050 merged commit 516c8c8 into ManimCommunity:main Jun 16, 2026
14 of 15 checks passed
@behackl behackl added the pr:bugfix Bug fix for use in PRs solving a specific issue:bug label Aug 8, 2026
@behackl behackl changed the title Fix ThreeDScene.set_to_default_angled_camera_orientation() Fix set_to_default_angled_camera_orientation() raising AttributeError Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:bugfix Bug fix for use in PRs solving a specific issue:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants