From d7c2d6863d54c4273fa6fa5ba126f79f0c5a309d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 26 Nov 2008 12:50:12 +0000 Subject: [PATCH] From Andy Preece, "To reproduce the bug: 1. Create a template osg::Sequence node (and underlying geometry) but do not attach the node to the current active scenegraph. 2. At some point during the rendering loop (perhaps on a keystroke) clone the sequence node (I use the call: dynamic_cast(templateNode -> clone( osg::CopyOp( (osg::CopyOp::CopyFlags)osg::CopyOp::DEEP_COPY_NODES ) ) ) 3. Set the cloned sequence node duration to a value that makes the animation run slower (i.e. 2.0). 4. Start the cloned sequence (using setMode()). 5. Repeat steps 2 \u2013 4 and observe that the cloned sequences do not run slow but run as fast, appearing to ignore the duration that has been set on them. Looking at the \u2018good documentation\u2019 (2.4 source code), I see that _start is being set to _now (osg::Sequence::setMode(), line 192). Should this not _start not be set to -1.0?" --- src/osg/Sequence.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osg/Sequence.cpp b/src/osg/Sequence.cpp index 1fb099904..59395aea1 100644 --- a/src/osg/Sequence.cpp +++ b/src/osg/Sequence.cpp @@ -189,7 +189,7 @@ void Sequence::setMode(SequenceMode mode) uend = (_end < 0 ? (int)_frameTime.size()-1: _end); _step = (ubegin > uend ? -1 : 1); - _start = _now; + _start = -1.0; _mode = mode; if (_saveRealLastFrameTime>=0.) {