mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:17:29 +02:00
call into correct thread to getJointNames on entity
This commit is contained in:
parent
f265656e74
commit
a515d6debe
1 changed files with 5 additions and 0 deletions
|
@ -774,6 +774,11 @@ int RenderableModelEntityItem::getJointIndex(const QString& name) const {
|
||||||
|
|
||||||
QStringList RenderableModelEntityItem::getJointNames() const {
|
QStringList RenderableModelEntityItem::getJointNames() const {
|
||||||
QStringList result;
|
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()) {
|
if (_model && _model->isActive()) {
|
||||||
RigPointer rig = _model->getRig();
|
RigPointer rig = _model->getRig();
|
||||||
int jointCount = rig->getJointStateCount();
|
int jointCount = rig->getJointStateCount();
|
||||||
|
|
Loading…
Reference in a new issue