mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:17:02 +02:00
correctly resizing blendshapes vector
This commit is contained in:
parent
d215856b23
commit
06c5fa0585
2 changed files with 4 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#include <QtCore/QJsonObject>
|
#include <QtCore/QJsonObject>
|
||||||
#include <QtCore/QJsonArray>
|
#include <QtCore/QJsonArray>
|
||||||
|
#include <QVector>
|
||||||
|
|
||||||
#include <FaceshiftConstants.h>
|
#include <FaceshiftConstants.h>
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
|
@ -39,7 +40,7 @@ HeadData::HeadData(AvatarData* owningAvatar) :
|
||||||
_averageLoudness(0.0f),
|
_averageLoudness(0.0f),
|
||||||
_browAudioLift(0.0f),
|
_browAudioLift(0.0f),
|
||||||
_owningAvatar(owningAvatar),
|
_owningAvatar(owningAvatar),
|
||||||
_baseBlendshapeCoefficients(0, 0)
|
_baseBlendshapeCoefficients(QVector<float>(0, 0))
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -102,6 +103,8 @@ void HeadData::setBlendshape(QString name, float val) {
|
||||||
if (it != blendshapeLookupMap.end()) {
|
if (it != blendshapeLookupMap.end()) {
|
||||||
if (_blendshapeCoefficients.size() <= it.value()) {
|
if (_blendshapeCoefficients.size() <= it.value()) {
|
||||||
_blendshapeCoefficients.resize(it.value() + 1);
|
_blendshapeCoefficients.resize(it.value() + 1);
|
||||||
|
}
|
||||||
|
if (_baseBlendshapeCoefficients.size() <= it.value()) {
|
||||||
_baseBlendshapeCoefficients.resize(it.value() + 1);
|
_baseBlendshapeCoefficients.resize(it.value() + 1);
|
||||||
}
|
}
|
||||||
_baseBlendshapeCoefficients[it.value()] = val;
|
_baseBlendshapeCoefficients[it.value()] = val;
|
||||||
|
|
|
@ -901,7 +901,6 @@ Blender::Blender(ModelPointer model, int blendNumber, const Geometry::WeakPointe
|
||||||
}
|
}
|
||||||
|
|
||||||
void Blender::run() {
|
void Blender::run() {
|
||||||
qDebug() << "!!!!!!!!!!!!!!" << _blendshapeCoefficients;
|
|
||||||
PROFILE_RANGE_EX(simulation_animation, __FUNCTION__, 0xFFFF0000, 0, { { "url", _model->getURL().toString() } });
|
PROFILE_RANGE_EX(simulation_animation, __FUNCTION__, 0xFFFF0000, 0, { { "url", _model->getURL().toString() } });
|
||||||
QVector<glm::vec3> vertices, normals;
|
QVector<glm::vec3> vertices, normals;
|
||||||
if (_model) {
|
if (_model) {
|
||||||
|
|
Loading…
Reference in a new issue