add getJointIndex call

This commit is contained in:
Seth Alves 2016-01-18 11:15:03 -08:00
parent 8b6e89a5c4
commit 4232e400cc
2 changed files with 16 additions and 0 deletions

View file

@ -763,3 +763,17 @@ void RenderableModelEntityItem::locationChanged() {
_model->setTranslation(getPosition());
}
}
int RenderableModelEntityItem::getJointIndex(const QString& name) const {
if (_model && _model->isActive()) {
RigPointer rig = _model->getRig();
return rig->indexOfJoint(name);
}
return -1;
}
// TODO -- expose a way to list joint names
// RenderableModelEntityItem::QStringList getJointNames() const {
// rig->nameOfJoint(i);
// }

View file

@ -79,6 +79,8 @@ public:
virtual void resizeJointArrays(int newSize = -1) override;
virtual int getJointIndex(const QString& name) const override;
private:
QVariantMap parseTexturesToMap(QString textures);
void remapTextures();