From 20d597bad2c2e62b85ae4ca1ee330cf322955d5d Mon Sep 17 00:00:00 2001 From: aignacio_sf <> Date: Tue, 31 Oct 2006 03:09:16 +0000 Subject: [PATCH] Set sampling rate to 0.0. Ignore duplicate transforms (keyframes). Fixes flicker problem for high frame rates. --- direct/src/motiontrail/MotionTrail.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/direct/src/motiontrail/MotionTrail.py b/direct/src/motiontrail/MotionTrail.py index a678eece59..6bc8820b71 100644 --- a/direct/src/motiontrail/MotionTrail.py +++ b/direct/src/motiontrail/MotionTrail.py @@ -80,7 +80,7 @@ class MotionTrail(NodePath, DirectObject): self.continuous_motion_trail = True self.color_scale = 1.0 self.time_window = 1.0 - self.sampling_time = 1.0 / 30.0 + self.sampling_time = 0.0 self.square_t = True self.task_transform = False @@ -140,6 +140,8 @@ class MotionTrail(NodePath, DirectObject): transform = None +# print motion_trail.time_window + if (motion_trail.root_node_path != None) and (motion_trail.root_node_path != render): motion_trail.root_node_path.update ( ) @@ -294,6 +296,11 @@ class MotionTrail(NodePath, DirectObject): def update_motion_trail (self, current_time, transform): + if (len (self.frame_list) >= 1): + if (transform == self.frame_list [0].transform): +# print "duplicate transform" + return + if (self.check_for_update (current_time)): color_scale = self.color_scale;