mirror of
https://github.com/3b1b/manim.git
synced 2025-07-29 13:03:31 +08:00
Merge pull request #1357 from parmentelat/master
handle_play_like_call decorator to use functools.wraps
This commit is contained in:
@ -3,6 +3,7 @@ import itertools as it
|
||||
import random
|
||||
import sys
|
||||
import moderngl
|
||||
from functools import wraps
|
||||
|
||||
import numpy as np
|
||||
|
||||
@ -1287,6 +1288,7 @@ class Mobject(object):
|
||||
# Operations touching shader uniforms
|
||||
|
||||
def affects_shader_info_id(func):
|
||||
@wraps(func)
|
||||
def wrapper(self):
|
||||
for mob in self.get_family():
|
||||
func(mob)
|
||||
|
@ -2,7 +2,7 @@ import itertools as it
|
||||
import operator as op
|
||||
import moderngl
|
||||
|
||||
from functools import reduce
|
||||
from functools import reduce, wraps
|
||||
|
||||
from manimlib.constants import *
|
||||
from manimlib.mobject.mobject import Mobject
|
||||
@ -807,6 +807,7 @@ class VMobject(Mobject):
|
||||
return tri_indices
|
||||
|
||||
def triggers_refreshed_triangulation(func):
|
||||
@wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
old_points = self.get_points()
|
||||
func(self, *args, **kwargs)
|
||||
|
@ -3,6 +3,7 @@ import random
|
||||
import platform
|
||||
import itertools as it
|
||||
import logging
|
||||
from functools import wraps
|
||||
|
||||
from tqdm import tqdm as ProgressDisplay
|
||||
import numpy as np
|
||||
@ -372,6 +373,7 @@ class Scene(object):
|
||||
return animations
|
||||
|
||||
def handle_play_like_call(func):
|
||||
@wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
self.update_skipping_status()
|
||||
should_write = not self.skip_animations
|
||||
|
Reference in New Issue
Block a user