Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -978,5 +978,19 @@ int EntityScriptingInterface::getJointIndex(const QUuid& entityID, const QString · 977 unmodified lines | |||
| 978 | return -1; | 978 | return -1; |
| 979 | } | 979 | } |
| 980 | EntityItemPointer entity = _entityTree->findEntityByEntityItemID(entityID); | 980 | EntityItemPointer entity = _entityTree->findEntityByEntityItemID(entityID); |
| 981 | if (!entity) { | ||
| 982 | return -1; | ||
| 983 | } | ||
| 981 | return entity->getJointIndex(name); | 984 | return entity->getJointIndex(name); |
| 982 | } | 985 | } |
| 986 | |||
| 987 | QStringList EntityScriptingInterface::getJointNames(const QUuid& entityID) { | ||
| 988 | if (!_entityTree) { | ||
| 989 | return QStringList(); | ||
| 990 | } | ||
| 991 | EntityItemPointer entity = _entityTree->findEntityByEntityItemID(entityID); | ||
| 992 | if (!entity) { | ||
| 993 | return QStringList(); | ||
| 994 | } | ||
| 995 | return entity->getJointNames(); | ||
| 996 | } | ||