mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +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 ids = data.entityIds;
|
||||||
var entityIDs = [];
|
var entityIDs = [];
|
||||||
for (var i = 0; i < ids.length; i++) {
|
for (var i = 0; i < ids.length; i++) {
|
||||||
var entityID = Entities.getEntityItemID(ids[i]);
|
entityIDs.push({
|
||||||
if (entityID.isKnownID) {
|
id: ids[i],
|
||||||
entityIDs.push(entityID);
|
isKnownID: true,
|
||||||
} else {
|
creatorTokenID: 0,
|
||||||
print("Tried to select invalid entity: " + ids[i]);
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
selectionManager.setSelections(entityIDs);
|
selectionManager.setSelections(entityIDs);
|
||||||
if (data.focus) {
|
if (data.focus) {
|
||||||
|
|
|
@ -44,20 +44,6 @@ EntityItemID EntityScriptingInterface::addEntity(const EntityItemProperties& pro
|
||||||
return id;
|
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 EntityScriptingInterface::identifyEntity(EntityItemID entityID) {
|
||||||
EntityItemID actualID = entityID;
|
EntityItemID actualID = entityID;
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,6 @@ public slots:
|
||||||
/// adds a model with the specific properties
|
/// adds a model with the specific properties
|
||||||
Q_INVOKABLE EntityItemID addEntity(const EntityItemProperties& 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
|
/// identify a recently created model to determine its true ID
|
||||||
Q_INVOKABLE EntityItemID identifyEntity(EntityItemID entityID);
|
Q_INVOKABLE EntityItemID identifyEntity(EntityItemID entityID);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue