OpenGL - Cairo discrepancy: AttributeError: 'OpenGLCamera' object has no attribute 'frame'
Description of bug / unexpected behavior
Even in a MovingCameraScene, there is no camera frame when rendering with OpenGL.
Expected behavior
A camera frame object just like in Cairo should exist.
How to reproduce the issue
Code for reproducing the problem
class LinearPredictiveCoding(MovingCameraScene):
def construct(self):
self.camera.frame.save_state()
Logs
Terminal output
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ Python\Python310\lib\site-packages\manim\cli\render\commands.py:103 in render │
│ │
│ 101 │ │ │ │ │ with tempconfig(config): │
│ 102 │ │ │ │ │ │ scene = SceneClass(renderer) │
│ ❱ 103 │ │ │ │ │ │ rerun = scene.render() │
│ 104 │ │ │ │ │ if rerun or config["write_all"]: │
│ 105 │ │ │ │ │ │ renderer.num_plays = 0 │
│ 106 │ │ │ │ │ │ continue │
│ │
│ Python\Python310\lib\site-packages\manim\scene\scene.py:222 in render │
│ │
│ 219 │ │ """ │
│ 220 │ │ self.setup() │
│ 221 │ │ try: │
│ ❱ 222 │ │ │ self.construct() │
│ 223 │ │ except EndSceneEarlyException: │
│ 224 │ │ │ pass │
│ 225 │ │ except RerunSceneException as e: │
│ │
│ some_file.py:7 in construct │
│ │
│ ❱ 7 │ │ self.camera.frame.save_state() │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'OpenGLCamera' object has no attribute 'frame'
Additional comments
I'm well aware that this might be a known not implemented feature, but I'm creating this bug so that it is documented.
I had the same issue as well.
this is expected, the opengl renderer does not support scenes other than Scene and ThreeDScene.
using the opengl renderer, the camera is itself a mobject, hence every Scene could be a MovingCameraScene. you should be able to do self.camera.save_state()
That is however another problematic discrepancy if one renderer uses self.camera and one uses self.camera.frame.
any update on this issue was there a solution ?