mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 04:44:08 +02:00
cleanup to blendshapes
This commit is contained in:
parent
0a295fc258
commit
d215856b23
3 changed files with 3 additions and 8 deletions
|
@ -242,7 +242,7 @@ void SkeletonModel::updateAttitude() {
|
|||
void SkeletonModel::simulate(float deltaTime, bool fullUpdate) {
|
||||
updateAttitude();
|
||||
if (fullUpdate) {
|
||||
setBlendshapeCoefficients(_owningAvatar->getHead()->getSummedBlendshapeCoefficients());
|
||||
setBlendshapeCoefficients(_owningAvatar->getHead()->getSummedBlendshapeCoefficients());
|
||||
|
||||
Model::simulate(deltaTime, fullUpdate);
|
||||
|
||||
|
|
|
@ -438,12 +438,6 @@ public:
|
|||
_headData->setBlendshapeCoefficients(blendshapeCoefficients);
|
||||
}
|
||||
}
|
||||
|
||||
void setSummedBlendshapeCoefficients(QVector<float>& blendshapeCoefficients) {
|
||||
if (_headData) {
|
||||
_headData->setSummedBlendshapeCoefficients(blendshapeCoefficients);
|
||||
}
|
||||
}
|
||||
|
||||
// access to Head().set/getMousePitch (degrees)
|
||||
float getHeadPitch() const { return _headData->getBasePitch(); }
|
||||
|
|
|
@ -39,7 +39,7 @@ HeadData::HeadData(AvatarData* owningAvatar) :
|
|||
_averageLoudness(0.0f),
|
||||
_browAudioLift(0.0f),
|
||||
_owningAvatar(owningAvatar),
|
||||
_baseBlendshapeCoefficients(0, 0),
|
||||
_baseBlendshapeCoefficients(0, 0)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ const QVector<float>& HeadData::getSummedBlendshapeCoefficients() {
|
|||
|
||||
void HeadData::setBlendshape(QString name, float val) {
|
||||
const auto& blendshapeLookupMap = getBlendshapesLookupMap();
|
||||
|
||||
//Check to see if the named blendshape exists, and then set its value if it does
|
||||
auto it = blendshapeLookupMap.find(name);
|
||||
if (it != blendshapeLookupMap.end()) {
|
||||
|
|
Loading…
Reference in a new issue