call into correct thread to getJointNames on entity

This commit is contained in:
Seth Alves 2016-01-19 15:16:58 -08:00
parent f265656e74
commit a515d6debe

View file

@ -774,6 +774,11 @@ int RenderableModelEntityItem::getJointIndex(const QString& name) const {
QStringList RenderableModelEntityItem::getJointNames() const {
QStringList result;
if (QThread::currentThread() != thread()) {
QMetaObject::invokeMethod(const_cast<RenderableModelEntityItem*>(this), "getJointNames", Qt::BlockingQueuedConnection,
Q_RETURN_ARG(QStringList, result));
return result;
}
if (_model && _model->isActive()) {
RigPointer rig = _model->getRig();
int jointCount = rig->getJointStateCount();