Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 41 files). Show all
Unified · Split
| @@ -35,6 +35,25 @@ bool EntityScriptingInterface::canAdjustLocks() { · 34 unmodified lines | |||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | void EntityScriptingInterface::setEntityTree(EntityTree* modelTree) { | ||
| 39 | if (_entityTree) { | ||
| 40 | disconnect(_entityTree, &EntityTree::addingEntity, this, &EntityScriptingInterface::addingEntity); | ||
| 41 | disconnect(_entityTree, &EntityTree::deletingEntity, this, &EntityScriptingInterface::deletingEntity); | ||
| 42 | disconnect(_entityTree, &EntityTree::changingEntityID, this, &EntityScriptingInterface::changingEntityID); | ||
| 43 | disconnect(_entityTree, &EntityTree::clearingEntities, this, &EntityScriptingInterface::clearingEntities); | ||
| 44 | } | ||
| 45 | |||
| 46 | _entityTree = modelTree; | ||
| 47 | |||
| 48 | if (_entityTree) { | ||
| 49 | connect(_entityTree, &EntityTree::addingEntity, this, &EntityScriptingInterface::addingEntity); | ||
| 50 | connect(_entityTree, &EntityTree::deletingEntity, this, &EntityScriptingInterface::deletingEntity); | ||
| 51 | connect(_entityTree, &EntityTree::changingEntityID, this, &EntityScriptingInterface::changingEntityID); | ||
| 52 | connect(_entityTree, &EntityTree::clearingEntities, this, &EntityScriptingInterface::clearingEntities); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | |||
| 56 | |||
| 38 | EntityItemID EntityScriptingInterface::addEntity(const EntityItemProperties& properties) { | 57 | EntityItemID EntityScriptingInterface::addEntity(const EntityItemProperties& properties) { |
| 39 | 58 | ||
| 40 | // The application will keep track of creatorTokenID | 59 | // The application will keep track of creatorTokenID |