mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 18:58:20 +02:00
Merge branch 'master' of github.com:worklist/hifi into nameserver
This commit is contained in:
commit
97966592e1
3 changed files with 15 additions and 3 deletions
|
@ -908,6 +908,10 @@ int VoxelSystem::updateNodeInArraysAsFullVBO(VoxelNode* node) {
|
||||||
// will forcibly remove it from the VBOs because we know better!!!
|
// will forcibly remove it from the VBOs because we know better!!!
|
||||||
int VoxelSystem::forceRemoveNodeFromArraysAsPartialVBO(VoxelNode* node) {
|
int VoxelSystem::forceRemoveNodeFromArraysAsPartialVBO(VoxelNode* node) {
|
||||||
|
|
||||||
|
if (!_initialized) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// if the node is not in the VBOs then we have nothing to do!
|
// if the node is not in the VBOs then we have nothing to do!
|
||||||
if (node->isKnownBufferIndex()) {
|
if (node->isKnownBufferIndex()) {
|
||||||
|
|
||||||
|
@ -937,6 +941,10 @@ int VoxelSystem::updateNodeInArraysAsPartialVBO(VoxelNode* node) {
|
||||||
if (_voxelsInWriteArrays >= _maxVoxels) {
|
if (_voxelsInWriteArrays >= _maxVoxels) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_initialized) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Now, if we've changed any attributes (our renderness, our color, etc) then update the Arrays...
|
// Now, if we've changed any attributes (our renderness, our color, etc) then update the Arrays...
|
||||||
if (node->isDirty()) {
|
if (node->isDirty()) {
|
||||||
|
|
|
@ -104,7 +104,7 @@ bool BlendFace::render(float alpha) {
|
||||||
if (mesh.isEye) {
|
if (mesh.isEye) {
|
||||||
glTranslatef(mesh.pivot.x, mesh.pivot.y, mesh.pivot.z);
|
glTranslatef(mesh.pivot.x, mesh.pivot.y, mesh.pivot.z);
|
||||||
glm::quat rotation = glm::inverse(orientation) * _owningHead->getEyeRotation(orientation *
|
glm::quat rotation = glm::inverse(orientation) * _owningHead->getEyeRotation(orientation *
|
||||||
(mesh.pivot * scale + MODEL_TRANSLATION) + _owningHead->getPosition());
|
((mesh.pivot + offset) * scale) + _owningHead->getPosition());
|
||||||
glm::vec3 rotationAxis = glm::axis(rotation);
|
glm::vec3 rotationAxis = glm::axis(rotation);
|
||||||
glRotatef(glm::angle(rotation), -rotationAxis.x, rotationAxis.y, -rotationAxis.z);
|
glRotatef(glm::angle(rotation), -rotationAxis.x, rotationAxis.y, -rotationAxis.z);
|
||||||
glTranslatef(-mesh.pivot.x, -mesh.pivot.y, -mesh.pivot.z);
|
glTranslatef(-mesh.pivot.x, -mesh.pivot.y, -mesh.pivot.z);
|
||||||
|
|
|
@ -383,7 +383,6 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
||||||
QList<QVariant> mappings = blendshapeMappings.values(blendshapeName);
|
QList<QVariant> mappings = blendshapeMappings.values(blendshapeName);
|
||||||
if (mappings.isEmpty()) {
|
if (mappings.isEmpty()) {
|
||||||
blendshapeIndices.insert(blendshapeName, QPair<int, float>(i, 1.0f));
|
blendshapeIndices.insert(blendshapeName, QPair<int, float>(i, 1.0f));
|
||||||
blendshapeIndices.insert("ExpressionBlendshapes." + blendshapeName, QPair<int, float>(i, 1.0f));
|
|
||||||
} else {
|
} else {
|
||||||
foreach (const QVariant& mapping, mappings) {
|
foreach (const QVariant& mapping, mappings) {
|
||||||
QVariantList blendshapeMapping = mapping.toList();
|
QVariantList blendshapeMapping = mapping.toList();
|
||||||
|
@ -636,8 +635,13 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
||||||
}
|
}
|
||||||
} else if (object.properties.at(2) == "BlendShapeChannel") {
|
} else if (object.properties.at(2) == "BlendShapeChannel") {
|
||||||
QByteArray name = object.properties.at(1).toByteArray();
|
QByteArray name = object.properties.at(1).toByteArray();
|
||||||
|
name = name.left(name.indexOf('\0'));
|
||||||
|
if (!blendshapeIndices.contains(name)) {
|
||||||
|
// try everything after the dot
|
||||||
|
name = name.mid(name.lastIndexOf('.') + 1);
|
||||||
|
}
|
||||||
blendshapeChannelIndices.insert(object.properties.at(0).value<qint64>(),
|
blendshapeChannelIndices.insert(object.properties.at(0).value<qint64>(),
|
||||||
blendshapeIndices.value(name.left(name.indexOf('\0'))));
|
blendshapeIndices.value(name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue