Fix: Issue with OpenGL rendering for Transform of SVGMobjects #4182#4374
Fix: Issue with OpenGL rendering for Transform of SVGMobjects #4182#4374henrikmidtiby wants to merge 3 commits intoManimCommunity:mainfrom
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
| 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
This is a fix for issue #4182
Overview: What does this pull request change?
In some cases the
stroke_widthparameter is not saved as anp.ndarraybut afloatorintinstead.In that case the
len(...)call will fail in thealign_datamethod inopengl_mobject.py.In the PR the for loop in
align_datais also skipped for data with the keystroke_widthor if theself.data[key]is of typeintin theinterpolatemethod.Reviewer Checklist