manim
manim copied to clipboard
Arrow3D issue in `__init__` for `--renderer=opengl`
Description of bug / unexpected behavior
I try to run OpenGL as renderer for Arrow3D and I see the issue that the default strokewidth
is 0.5
, which is a float and not interable
:
manim/lib/python3.10/site-packages/manim/mobject/opengl/opengl_v │
│ ectorized_mobject.py:413 in has_stroke │
│ │
│ 410 │ │ return ( │
│ 411 │ │ │ stroke_widths is not None │
│ 412 │ │ │ and stroke_opacities is not None │
│ ❱ 413 │ │ │ and any(stroke_widths) │
│ 414 │ │ │ and any(stroke_opacities) │
│ 415 │ │ ) │
│ 416 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: 'float' object is not iterable
Code for reproducing the problem
arrow = Arrow3D(
start=start_location,
end=end_location,
resolution=RES,
color=color,
)
This can be tackled by making https://github.com/ManimCommunity/manim/blob/27011d648f8a0fe0d79fd9187b21083a4009a940/manim/mobject/three_d/three_dimensions.py#L109 to :
stroke_width: list = [0.5],
However, I am sure this is cosmetic and not the actual fix.