mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-17 12:49:49 +02:00
Add getStaticCertificateJSON() to Entity Scripting Interface
This commit is contained in:
parent
1bd12857ef
commit
f5df83667f
2 changed files with 19 additions and 0 deletions
|
@ -1821,6 +1821,19 @@ glm::mat4 EntityScriptingInterface::getEntityLocalTransform(const QUuid& entityI
|
|||
return result;
|
||||
}
|
||||
|
||||
QByteArray EntityScriptingInterface::getStaticCertificateJSON(QUuid entityID) {
|
||||
QByteArray result;
|
||||
if (_entityTree) {
|
||||
_entityTree->withReadLock([&] {
|
||||
EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(entityID));
|
||||
if (entity) {
|
||||
result = entity->getProperties().getStaticCertificateJSON();
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool EntityScriptingInterface::verifyStaticCertificateProperties(const QUuid& entityID) {
|
||||
bool result = false;
|
||||
if (_entityTree) {
|
||||
|
|
|
@ -423,6 +423,12 @@ public slots:
|
|||
*/
|
||||
Q_INVOKABLE glm::mat4 getEntityLocalTransform(const QUuid& entityID);
|
||||
|
||||
|
||||
/**jsdoc
|
||||
* Return the Static Certificate JSON for the specified {EntityID}.
|
||||
* @return {QByteArray} The Static Certificate JSON for the specified entity.
|
||||
*/
|
||||
Q_INVOKABLE QByteArray getStaticCertificateJSON(QUuid entityID);
|
||||
Q_INVOKABLE bool verifyStaticCertificateProperties(const QUuid& entityID);
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Reference in a new issue