mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 03:40:20 +02:00
Merge pull request #3867 from AndrewMeadows/bispinor
don't lookup entity by ID when deleting script
This commit is contained in:
commit
b136f4c649
3 changed files with 6 additions and 15 deletions
2
interface/external/gverb/readme.txt
vendored
2
interface/external/gverb/readme.txt
vendored
|
@ -12,4 +12,4 @@ Clément Brisset, October 22nd, 2014
|
||||||
3. Place the directories “include” and “src” in interface/external/gverb
|
3. Place the directories “include” and “src” in interface/external/gverb
|
||||||
(Normally next to this readme)
|
(Normally next to this readme)
|
||||||
|
|
||||||
4. Clear your build directory, run cmake, build and you should be all set.
|
4. Clear your build directory, run cmake, build and you should be all set.
|
||||||
|
|
|
@ -195,22 +195,14 @@ QScriptValue EntityTreeRenderer::loadEntityScript(EntityItem* entity) {
|
||||||
return entityScriptObject; // newly constructed
|
return entityScriptObject; // newly constructed
|
||||||
}
|
}
|
||||||
|
|
||||||
QScriptValue EntityTreeRenderer::getPreviouslyLoadedEntityScript(const EntityItemID& entityItemID) {
|
QScriptValue EntityTreeRenderer::getPreviouslyLoadedEntityScript(const EntityItemID& entityID) {
|
||||||
EntityItem* entity = static_cast<EntityTree*>(_tree)->findEntityByEntityItemID(entityItemID);
|
if (_entityScripts.contains(entityID)) {
|
||||||
return getPreviouslyLoadedEntityScript(entity);
|
EntityScriptDetails details = _entityScripts[entityID];
|
||||||
}
|
return details.scriptObject; // previously loaded
|
||||||
|
|
||||||
|
|
||||||
QScriptValue EntityTreeRenderer::getPreviouslyLoadedEntityScript(EntityItem* entity) {
|
|
||||||
if (entity) {
|
|
||||||
EntityItemID entityID = entity->getEntityItemID();
|
|
||||||
if (_entityScripts.contains(entityID)) {
|
|
||||||
EntityScriptDetails details = _entityScripts[entityID];
|
|
||||||
return details.scriptObject; // previously loaded
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return QScriptValue(); // no script
|
return QScriptValue(); // no script
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityTreeRenderer::setTree(Octree* newTree) {
|
void EntityTreeRenderer::setTree(Octree* newTree) {
|
||||||
OctreeRenderer::setTree(newTree);
|
OctreeRenderer::setTree(newTree);
|
||||||
static_cast<EntityTree*>(_tree)->setFBXService(this);
|
static_cast<EntityTree*>(_tree)->setFBXService(this);
|
||||||
|
|
|
@ -131,7 +131,6 @@ private:
|
||||||
QScriptValue loadEntityScript(EntityItem* entity);
|
QScriptValue loadEntityScript(EntityItem* entity);
|
||||||
QScriptValue loadEntityScript(const EntityItemID& entityItemID);
|
QScriptValue loadEntityScript(const EntityItemID& entityItemID);
|
||||||
QScriptValue getPreviouslyLoadedEntityScript(const EntityItemID& entityItemID);
|
QScriptValue getPreviouslyLoadedEntityScript(const EntityItemID& entityItemID);
|
||||||
QScriptValue getPreviouslyLoadedEntityScript(EntityItem* entity);
|
|
||||||
QString loadScriptContents(const QString& scriptMaybeURLorText);
|
QString loadScriptContents(const QString& scriptMaybeURLorText);
|
||||||
QScriptValueList createMouseEventArgs(const EntityItemID& entityID, QMouseEvent* event, unsigned int deviceID);
|
QScriptValueList createMouseEventArgs(const EntityItemID& entityID, QMouseEvent* event, unsigned int deviceID);
|
||||||
QScriptValueList createMouseEventArgs(const EntityItemID& entityID, const MouseEvent& mouseEvent);
|
QScriptValueList createMouseEventArgs(const EntityItemID& entityID, const MouseEvent& mouseEvent);
|
||||||
|
|
Loading…
Reference in a new issue