From Cedric Pinson, Fix warning in osgAnimation, UpdateCallback. Fix bug removing callback in Action. Fix warning Stats
This commit is contained in:
@@ -140,8 +140,9 @@ void UpdateActionVisitor::apply(ActionAnimation& action)
|
||||
{
|
||||
unsigned int frame = getLocalFrame();
|
||||
apply(static_cast<Action&>(action));
|
||||
// action.updateAnimation(frame, getCurrentLayer());
|
||||
action.updateAnimation(frame, -_currentAnimationPriority++);
|
||||
int pri = static_cast<int>(_currentAnimationPriority);
|
||||
_currentAnimationPriority++;
|
||||
action.updateAnimation(frame, -pri);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -424,8 +424,7 @@ struct ValueTextDrawCallback : public virtual osg::Drawable::DrawCallback
|
||||
pos.y() -= characterSize *2 + backgroundMargin;
|
||||
|
||||
for (std::map<std::string, StatAction >::iterator it = _actions.begin(); it != _actions.end(); it++) {
|
||||
//if ((*it).second.update())
|
||||
(*it).second._group->setNodeMask(~1);
|
||||
(*it).second._group->setNodeMask(~osg::Node::NodeMask(1));
|
||||
}
|
||||
|
||||
const std::vector<std::string>& channels = visitor->getChannels();
|
||||
@@ -441,7 +440,7 @@ struct ValueTextDrawCallback : public virtual osg::Drawable::DrawCallback
|
||||
_actions[name].setPosition(pos);
|
||||
//_actions[name].touch();
|
||||
}
|
||||
_actions[name]._group->setNodeMask(~0);
|
||||
_actions[name]._group->setNodeMask(~osg::Node::NodeMask(0x0));
|
||||
size[name] = 0;
|
||||
pos.y() -= characterSize + graphSpacing;
|
||||
}
|
||||
|
||||
@@ -77,6 +77,10 @@ void StatsActionVisitor::apply(ActionStripAnimation& action)
|
||||
if (isActive(action))
|
||||
{
|
||||
_channels.push_back(action.getName());
|
||||
_stats->setAttribute(_frame,action.getName(), action.getAnimation()->getAnimation()->getWeight());
|
||||
double value;
|
||||
std::string name = action.getName();
|
||||
if (_stats->getAttribute(_frame, name, value))
|
||||
name += "+";
|
||||
_stats->setAttribute(_frame, action.getName(), action.getAnimation()->getAnimation()->getWeight());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user