mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
Remove EntityScriptingInterface::getEntityItemID
This commit is contained in:
parent
6f0d5faa5b
commit
6a68281308
3 changed files with 5 additions and 23 deletions
|
@ -33,12 +33,11 @@ EntityListTool = function(opts) {
|
|||
var ids = data.entityIds;
|
||||
var entityIDs = [];
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
var entityID = Entities.getEntityItemID(ids[i]);
|
||||
if (entityID.isKnownID) {
|
||||
entityIDs.push(entityID);
|
||||
} else {
|
||||
print("Tried to select invalid entity: " + ids[i]);
|
||||
}
|
||||
entityIDs.push({
|
||||
id: ids[i],
|
||||
isKnownID: true,
|
||||
creatorTokenID: 0,
|
||||
});
|
||||
}
|
||||
selectionManager.setSelections(entityIDs);
|
||||
if (data.focus) {
|
||||
|
|
|
@ -44,20 +44,6 @@ EntityItemID EntityScriptingInterface::addEntity(const EntityItemProperties& pro
|
|||
return id;
|
||||
}
|
||||
|
||||
EntityItemID EntityScriptingInterface::getEntityItemID(const QString& uuid) {
|
||||
EntityItemID entityID = EntityItemID(QUuid(uuid), UNKNOWN_ENTITY_TOKEN, false);
|
||||
|
||||
_entityTree->lockForRead();
|
||||
EntityItem* entity = const_cast<EntityItem*>(_entityTree->findEntityByEntityItemID(entityID));
|
||||
_entityTree->unlock();
|
||||
|
||||
if (entity) {
|
||||
return entity->getEntityItemID();
|
||||
}
|
||||
|
||||
return entityID;
|
||||
}
|
||||
|
||||
EntityItemID EntityScriptingInterface::identifyEntity(EntityItemID entityID) {
|
||||
EntityItemID actualID = entityID;
|
||||
|
||||
|
|
|
@ -64,9 +64,6 @@ public slots:
|
|||
/// adds a model with the specific properties
|
||||
Q_INVOKABLE EntityItemID addEntity(const EntityItemProperties& properties);
|
||||
|
||||
// Get EntityItemID from uuid string
|
||||
Q_INVOKABLE EntityItemID getEntityItemID(const QString& entityID);
|
||||
|
||||
/// identify a recently created model to determine its true ID
|
||||
Q_INVOKABLE EntityItemID identifyEntity(EntityItemID entityID);
|
||||
|
||||
|
|
Loading…
Reference in a new issue