Csaba/Jester : fix a problem with material animation

This commit is contained in:
fredb
2008-12-12 19:57:25 +00:00
parent 0e7bdc208b
commit 73b974f1b5

View File

@@ -375,8 +375,10 @@ SGMaterialAnimation::createAnimationGroup(osg::Group& parent)
const SGPropertyNode* node = getConfig()->getChild("property-base");
if (node)
inputRoot = getModelRoot()->getNode(node->getStringValue(), true);
if (getConfig()->hasChild("texture-prop"))
if (getConfig()->hasChild("texture-prop")) {
osg::StateSet* stateSet = group->getOrCreateStateSet();
stateSet->setDataVariance(osg::Object::DYNAMIC);
}
if (getConfig()->hasChild("texture")) {
std::string textureName = getConfig()->getStringValue("texture");
std::string textureFile;