mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
In Mobject.set_uniforms, copy uniforms that are numpy arrays
This commit is contained in:
parent
6474e25fcd
commit
c04615c4e9
1 changed files with 4 additions and 2 deletions
|
@ -136,8 +136,10 @@ class Mobject(object):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def set_uniforms(self, uniforms: dict):
|
def set_uniforms(self, uniforms: dict):
|
||||||
for key in uniforms:
|
for key, value in uniforms.items():
|
||||||
self.uniforms[key] = uniforms[key] # Copy?
|
if isinstance(value, np.ndarray):
|
||||||
|
value = value.copy()
|
||||||
|
self.uniforms[key] = value
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Reference in a new issue