ManimCommunity / ManimCommunity/manim
Setting the joint type of one VMobject sets the joint type for every VMobject
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of bug / unexpected behavior
Setting the `joint_type` of a VMobject, and adding that VMobject to the scene also applies that same `joint_type` to all other VMobjects.
This seems to almost always happen, except for when the object with the custom joint type is added to the scene last, and no animations are played after it is added.
## Expected behavior
Setting the joint type of one VMobject does not affect any other VMobjects.
## How to reproduce the issue
Create two objects, and set the joint type of one of them. Then render both objects and play any animation. After the animation finishes, both objects will have the set joint type.
Code for reproducing the problem
The left square has no joint type set. It should remain unaffected.
```py
from manim import *
class TwoSquares(Scene):
def construct(self):
square = Square(stroke_width = 50).move_to(LEFT * 2)
square2 = Square(stroke_width = 50, joint_type = LineJointType.ROUND).move_to(RIGHT * 2)
self.play(Create(square))
self.play(Create(square2))
self.wait()
```
## Additional media files
https://github.com/ManimCommunity/manim/assets/22244974/7e8287ce-1870-4020-aa9c-dff4763020fe
## Logs
Terminal output
N/A - logs are no different than any ordinary render
## System specifications
System Details
- OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)): Windows 10 Home 22H2 19045.3570
- RAM: 16.0 GB
- Python version (`python/py/python3 --version`): Python 3.10.5
- Installed modules (provide output from `pip list`):
```
Package Version Editable project location
------------------- ------------------ --------------------------------------
certifi 2022.6.15
charset-normalizer 2.0.12
click 8.1.3
click-default-group 1.2.2
cloup 0.13.1
colorama 0.4.5
colour 0.1.5
commonmark 0.9.1
contourpy 1.0.6
cycler 0.11.0
decorator 5.1.1
fonttools 4.38.0
glcontext 2.3.6
idna 3.3
isosurfaces 0.1.0
kiwisolver 1.4.4
manim 0.17.3
ManimPango 0.4.1
mapbox-earcut 1.0.1
matplotlib 3.6.2
moderngl 5.6.4
moderngl-window 2.4.1
multipledispatch 0.6.0
networkx 2.8.4
numpy 1.22.4
packaging 22.0
Pillow 9.1.1
pip 22.0.4
pycairo 1.21.0
pydub 0.25.1
pyglet 1.5.26
Pygments 2.12.0
pyparsing 3.0.9
pyrr 0.10.3
python-dateutil 2.8.2
requests 2.28.0
rich 12.4.4
scipy 1.8.1
screeninfo 0.8
setuptools 58.1.0
six 1.16.0
skia-pathops 0.7.2
srt 3.5.2
svgelements 1.8.4
tqdm 4.64.0
typing_extensions 4.8.0
urllib3 1.26.9
watchdog 2.1.9
wheel 0.37.1
```
LaTeX details
N/A
FFMPEG
Output of `ffmpeg -version`:
```
ffmpeg version 5.0.1-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
```
## Additional comments
Contributor guide
Research direction
Start by running the provided TwoSquares reproduction and trace how VMobject joint_type is handled during scene addition and animation. Confirm that setting LineJointType.ROUND on one square leaves the other square unchanged after rendering and animation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100