-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix: Issue with OpenGL rendering for Transform of SVGMobjects #4182 #4374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Wouldn't it be better to make sure the Thanks for your effort! |
In this branch https://github.com/henrikmidtiby/manim/commits/Issue4182MakeArray/ I have tried to make
This seems to be caused by the |
bf4a386
to
a88421c
Compare
if self.stroke_width is None: | ||
self.stroke_width = 0 | ||
if stroke_width is None: | ||
self.stroke_width = None |
Check warning
Code scanning / CodeQL
Overwriting attribute in super-class or sub-class Warning
VMobject
if stroke_width is None: | ||
self.stroke_width = None | ||
else: | ||
self.stroke_width = np.array([[stroke_width]]) # type: ignore[assignment] |
Check warning
Code scanning / CodeQL
Overwriting attribute in super-class or sub-class Warning
This is a fix for issue #4182
Overview: What does this pull request change?
In some cases the
stroke_width
parameter is not saved as anp.ndarray
but afloat
orint
instead.In that case the
len(...)
call will fail in thealign_data
method inopengl_mobject.py
.In the PR the for loop in
align_data
is also skipped for data with the keystroke_width
or if theself.data[key]
is of typeint
in theinterpolate
method.Reviewer Checklist