mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 18:32:36 +00:00
Clone animation tracks
This commit is contained in:
parent
6c0c28c2eb
commit
b28d8251aa
@ -103,10 +103,14 @@ namespace SceneUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
OsgAnimationController::OsgAnimationController(const OsgAnimationController ©, const osg::CopyOp ©op) : SceneUtil::KeyframeController(copy, copyop)
|
OsgAnimationController::OsgAnimationController(const OsgAnimationController ©, const osg::CopyOp ©op) : SceneUtil::KeyframeController(copy, copyop)
|
||||||
, mMergedAnimationTracks(copy.mMergedAnimationTracks)
|
|
||||||
, mEmulatedAnimations(copy.mEmulatedAnimations)
|
, mEmulatedAnimations(copy.mEmulatedAnimations)
|
||||||
{
|
{
|
||||||
mLinker = nullptr;
|
mLinker = nullptr;
|
||||||
|
for (const auto& mergedAnimationTrack : copy.mMergedAnimationTracks)
|
||||||
|
{
|
||||||
|
Resource::Animation* copiedAnimationTrack = dynamic_cast<Resource::Animation*>(mergedAnimationTrack.get()->clone(copyop));
|
||||||
|
mMergedAnimationTracks.emplace_back(copiedAnimationTrack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Vec3f OsgAnimationController::getTranslation(float time) const
|
osg::Vec3f OsgAnimationController::getTranslation(float time) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user