From f82e597ac7bf45dc654a1f0e3b6d1e5d85b1a7a9 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 15 May 2018 09:34:07 -0700 Subject: [PATCH] Updating documentation for getChildrenIDs + fixing issue #1934 --- interface/src/ui/overlays/Overlays.h | 2 +- libraries/entities/src/EntityScriptingInterface.cpp | 8 -------- libraries/entities/src/EntityScriptingInterface.h | 8 ++++---- scripts/defaultScripts.js | 3 +-- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/interface/src/ui/overlays/Overlays.h b/interface/src/ui/overlays/Overlays.h index cf1151b46a..b2728e68b2 100644 --- a/interface/src/ui/overlays/Overlays.h +++ b/interface/src/ui/overlays/Overlays.h @@ -482,7 +482,7 @@ public slots: /**jsdoc * Check if there is an overlay of a given ID. - * @function Overlays.isAddedOverly + * @function Overlays.isAddedOverlay * @param {Uuid} overlayID - The ID to check. * @returns {boolean} true if an overlay with the given ID exists, false otherwise. */ diff --git a/libraries/entities/src/EntityScriptingInterface.cpp b/libraries/entities/src/EntityScriptingInterface.cpp index 65bacfec5a..2558cb4ed7 100644 --- a/libraries/entities/src/EntityScriptingInterface.cpp +++ b/libraries/entities/src/EntityScriptingInterface.cpp @@ -1659,12 +1659,6 @@ QVector EntityScriptingInterface::getChildrenIDs(const QUuid& parentID) { if (!_entityTree) { return result; } - - //EntityItemPointer entity = _entityTree->findEntityByEntityItemID(parentID); - //if (!entity) { - // qCDebug(entities) << "EntityScriptingInterface::getChildrenIDs - no entity with ID" << parentID; - // return result; - //} _entityTree->withReadLock([&] { QSharedPointer parentFinder = DependencyManager::get(); if (!parentFinder) { @@ -1679,8 +1673,6 @@ QVector EntityScriptingInterface::getChildrenIDs(const QUuid& parentID) { if (!parent) { return; } - //_entityTree->withReadLock([&] { - //entity->forEachChild([&](SpatiallyNestablePointer child) { parent->forEachChild([&](SpatiallyNestablePointer child) { result.push_back(child->getID()); }); diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index 7e47d9e2d4..46a994e183 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -1216,12 +1216,12 @@ public slots: /**jsdoc - * Get the IDs of entities, overlays, and avatars that are directly parented to an entity. To get all descendants of an - * entity, recurse on the IDs returned by the function. + * Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model. To get all descendants of an + * entity; overlay; or avatar, recurse on the IDs returned by the function. * @function Entities.getChildrenIDs - * @param {Uuid} parentID - The ID of the entity to get the children IDs of. + * @param {Uuid} parentID - The ID of the entity, overlay, or avatar to get the children IDs of. * @returns {Uuid[]} An array of entity, overlay, and avatar IDs that are parented directly to the parentID - * entity. Does not include children's children, etc. The array is empty if no children can be found or + * entity, overlay, or avatar. Does not include children's children, etc. The array is empty if no children can be found or * parentID cannot be found. * @example Report the children of an entity. * function createEntity(description, position, parent) { diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index 12e9a4fd58..71755e3abb 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -30,8 +30,7 @@ var DEFAULT_SCRIPTS_COMBINED = [ "system/dialTone.js", "system/firstPersonHMD.js", "system/tablet-ui/tabletUI.js", - "system/emote.js", - "system/createobject.js" + "system/emote.js" ]; var DEFAULT_SCRIPTS_SEPARATE = [ "system/controllers/controllerScripts.js"