Updating documentation for getChildrenIDs + fixing issue #1934

This commit is contained in:
Wayne Chen 2018-05-15 09:34:07 -07:00
parent bd6905b3d2
commit f82e597ac7
4 changed files with 6 additions and 15 deletions

View file

@ -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} <code>true</code> if an overlay with the given ID exists, <code>false</code> otherwise.
*/

View file

@ -1659,12 +1659,6 @@ QVector<QUuid> 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<SpatialParentFinder> parentFinder = DependencyManager::get<SpatialParentFinder>();
if (!parentFinder) {
@ -1679,8 +1673,6 @@ QVector<QUuid> EntityScriptingInterface::getChildrenIDs(const QUuid& parentID) {
if (!parent) {
return;
}
//_entityTree->withReadLock([&] {
//entity->forEachChild([&](SpatiallyNestablePointer child) {
parent->forEachChild([&](SpatiallyNestablePointer child) {
result.push_back(child->getID());
});

View file

@ -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 <code>parentID</code>
* 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
* <code>parentID</code> cannot be found.
* @example <caption>Report the children of an entity.</caption>
* function createEntity(description, position, parent) {

View file

@ -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"