|
|
|
@ -543,7 +543,7 @@ namespace MWRender
|
|
|
|
|
size_t blendMask = detectBlendMask(node);
|
|
|
|
|
|
|
|
|
|
// clone the controller, because each Animation needs its own ControllerSource
|
|
|
|
|
osg::ref_ptr<NifOsg::KeyframeController> cloned = osg::clone(it->second.get(), osg::CopyOp::DEEP_COPY_ALL);
|
|
|
|
|
osg::ref_ptr<NifOsg::KeyframeController> cloned = new NifOsg::KeyframeController(*it->second, osg::CopyOp::SHALLOW_COPY);
|
|
|
|
|
cloned->setSource(mAnimationTimePtr[blendMask]);
|
|
|
|
|
|
|
|
|
|
animsrc->mControllerMap[blendMask].insert(std::make_pair(bonename, cloned));
|
|
|
|
@ -1272,7 +1272,7 @@ namespace MWRender
|
|
|
|
|
writableStateSet = node->getOrCreateStateSet();
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
writableStateSet = osg::clone(node->getStateSet(), osg::CopyOp::SHALLOW_COPY);
|
|
|
|
|
writableStateSet = new osg::StateSet(*node->getStateSet(), osg::CopyOp::SHALLOW_COPY);
|
|
|
|
|
node->setStateSet(writableStateSet);
|
|
|
|
|
}
|
|
|
|
|
writableStateSet->setTextureAttributeAndModes(texUnit, textures.front(), osg::StateAttribute::ON);
|
|
|
|
|