mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +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());
|
||||
}
|
||||
}
|
||||
|
||||
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 int getJointIndex(const QString& name) const override;
|
||||
|
||||
private:
|
||||
QVariantMap parseTexturesToMap(QString textures);
|
||||
void remapTextures();
|
||||
|
|
Loading…
Reference in a new issue