update soft entities and fix deadlock from qml.
Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 3 files). Show all
Unified · Split
| @@ -1754,8 +1754,9 @@ int EntityScriptingInterface::getJointIndex(const QUuid& entityID, const QString · 1753 unmodified lines | |||
| 1754 | return -1; | 1754 | return -1; |
| 1755 | } | 1755 | } |
| 1756 | int result; | 1756 | int result; |
| 1757 | BLOCKING_INVOKE_METHOD(_entityTree.get(), "getJointIndex", | 1757 | _entityTree->withReadLock([&] { |
| 1758 | Q_RETURN_ARG(int, result), Q_ARG(QUuid, entityID), Q_ARG(QString, name)); | 1758 | result = _entityTree->getJointIndex(entityID, name); |
| 1759 | }); | ||
| 1759 | return result; | 1760 | return result; |
| 1760 | } | 1761 | } |
| 1761 | 1762 | ||
| @@ -1764,8 +1765,9 @@ QStringList EntityScriptingInterface::getJointNames(const QUuid& entityID) { · 2 unmodified lines | |||
| 1764 | return QStringList(); | 1765 | return QStringList(); |
| 1765 | } | 1766 | } |
| 1766 | QStringList result; | 1767 | QStringList result; |
| 1767 | BLOCKING_INVOKE_METHOD(_entityTree.get(), "getJointNames", | 1768 | _entityTree->withReadLock([&] { |
| 1768 | Q_RETURN_ARG(QStringList, result), Q_ARG(QUuid, entityID)); | 1769 | result = _entityTree->getJointNames(entityID); |
| 1770 | }); | ||
| 1769 | return result; | 1771 | return result; |
| 1770 | } | 1772 | } |
| 1771 | 1773 | ||