Merge branch 'master' of github.com:worklist/hifi into nameserver

This commit is contained in:
Stephen Birarda 2013-10-08 13:19:55 -07:00
commit 97966592e1
3 changed files with 15 additions and 3 deletions

View file

@ -908,6 +908,10 @@ int VoxelSystem::updateNodeInArraysAsFullVBO(VoxelNode* node) {
// will forcibly remove it from the VBOs because we know better!!!
int VoxelSystem::forceRemoveNodeFromArraysAsPartialVBO(VoxelNode* node) {
if (!_initialized) {
return 0;
}
// if the node is not in the VBOs then we have nothing to do!
if (node->isKnownBufferIndex()) {
@ -937,6 +941,10 @@ int VoxelSystem::updateNodeInArraysAsPartialVBO(VoxelNode* node) {
if (_voxelsInWriteArrays >= _maxVoxels) {
return 0;
}
if (!_initialized) {
return 0;
}
// Now, if we've changed any attributes (our renderness, our color, etc) then update the Arrays...
if (node->isDirty()) {

View file

@ -104,7 +104,7 @@ bool BlendFace::render(float alpha) {
if (mesh.isEye) {
glTranslatef(mesh.pivot.x, mesh.pivot.y, mesh.pivot.z);
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);
glRotatef(glm::angle(rotation), -rotationAxis.x, rotationAxis.y, -rotationAxis.z);
glTranslatef(-mesh.pivot.x, -mesh.pivot.y, -mesh.pivot.z);

View file

@ -383,7 +383,6 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
QList<QVariant> mappings = blendshapeMappings.values(blendshapeName);
if (mappings.isEmpty()) {
blendshapeIndices.insert(blendshapeName, QPair<int, float>(i, 1.0f));
blendshapeIndices.insert("ExpressionBlendshapes." + blendshapeName, QPair<int, float>(i, 1.0f));
} else {
foreach (const QVariant& mapping, mappings) {
QVariantList blendshapeMapping = mapping.toList();
@ -636,8 +635,13 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
}
} else if (object.properties.at(2) == "BlendShapeChannel") {
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>(),
blendshapeIndices.value(name.left(name.indexOf('\0'))));
blendshapeIndices.value(name));
}
}
}