From 26de6443d00204cf8b593fc5ba6434973f8418f1 Mon Sep 17 00:00:00 2001 From: Damien Marchal Date: Sat, 2 Apr 2022 00:01:42 +0200 Subject: [PATCH] Dirty fix before full auto-reload from python is implemented. --- python3/src/splib3/animation/animate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python3/src/splib3/animation/animate.py b/python3/src/splib3/animation/animate.py index 7ef567e..d8e49f6 100644 --- a/python3/src/splib3/animation/animate.py +++ b/python3/src/splib3/animation/animate.py @@ -77,6 +77,9 @@ def __init__(self, *args, **kwargs): self.node = args[0] self.totalTime = 0 self.animations = [] + + def clearAnimations(self): + self.animations = [] def addAnimation(self, animation): self.animations.append(animation) @@ -165,7 +168,8 @@ def createScene(rootNode) """ global manager if manager is not None: - Sofa.msg_info(node, "There is already one animation manager in this scene...why do you need a second one ?") + #Sofa.msg_info(node, "There is already one animation manager in this scene...why do you need a second one ? Resting it.") + manager.clearAnimations() return manager manager = AnimationManagerController(node) return manager