Skip to content

Vector3D typing in opengl_mobject #4550

@BenskiBoy

Description

@BenskiBoy

Description of bug / unexpected behavior

Name error raised line 1225 manim/mobject/opengl/opengl_mobject.py when running in preview mode. i.e.
manim -qm -p --renderer=opengl main.py TableExamples
Adding from manim.typing import Vector3D regardless of type checking seems to do the trick.

Additionally, it seems the example code for table needs to updated.

https://docs.manim.community/en/stable/reference/manim.mobject.table.html
The line t2.get_horizontal_lines()[:3].set_z_index(1) should call .set_z(1) i believe.

Expected behavior

How to reproduce the issue

Code for reproducing the problem
from manim import *


class TableExamples(Scene):
    def construct(self):
        t0 = Table(
            [["First", "Second"], ["Third", "Fourth"]],
            row_labels=[Text("R1"), Text("R2")],
            col_labels=[Text("C1"), Text("C2")],
            top_left_entry=Text("TOP"),
        )

Additional media files

Images/GIFs

Logs

Terminal output

NameError: name 'Vector3D' is not defined

NameError: name 'Vector3D' is not defined

PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR

System specifications

System Details
  • OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)): Ubuntu 24.04.2 LTS
  • RAM: 32GB
  • Python version (python/py/python3 --version): 3.12
  • Installed modules (provide output from pip list):
PASTE HERE
LaTeX details
  • LaTeX distribution (e.g. TeX Live 2020):
  • Installed LaTeX packages:

Additional comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions