mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 17:05:07 +02:00
add getJointIndex call
This commit is contained in:
parent
8b6e89a5c4
commit
4232e400cc
2 changed files with 16 additions and 0 deletions
|
@ -763,3 +763,17 @@ void RenderableModelEntityItem::locationChanged() {
|
||||||
_model->setTranslation(getPosition());
|
_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);
|
||||||
|
// }
|
||||||
|
|
|
@ -79,6 +79,8 @@ public:
|
||||||
|
|
||||||
virtual void resizeJointArrays(int newSize = -1) override;
|
virtual void resizeJointArrays(int newSize = -1) override;
|
||||||
|
|
||||||
|
virtual int getJointIndex(const QString& name) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QVariantMap parseTexturesToMap(QString textures);
|
QVariantMap parseTexturesToMap(QString textures);
|
||||||
void remapTextures();
|
void remapTextures();
|
||||||
|
|
Loading…
Reference in a new issue