From 3b4f5e302338b04d8ba91c7a34ef4d480fe78fa4 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Sun, 15 Jan 2017 11:27:29 -0800 Subject: [PATCH] don't include overlays in results from EntityScriptingInterface::getChildrenIDsOfJoint --- libraries/entities/src/EntityScriptingInterface.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/entities/src/EntityScriptingInterface.cpp b/libraries/entities/src/EntityScriptingInterface.cpp index dc5100b6c5..6cdff99dac 100644 --- a/libraries/entities/src/EntityScriptingInterface.cpp +++ b/libraries/entities/src/EntityScriptingInterface.cpp @@ -1336,11 +1336,11 @@ bool EntityScriptingInterface::isChildOfParent(QUuid childID, QUuid parentID) { parent->forEachDescendant([&](SpatiallyNestablePointer descendant) { if(descendant->getID() == childID) { isChild = true; - return; + return; } }); }); - + return isChild; } @@ -1364,7 +1364,8 @@ QVector EntityScriptingInterface::getChildrenIDsOfJoint(const QUuid& pare return; } parent->forEachChild([&](SpatiallyNestablePointer child) { - if (child->getParentJointIndex() == jointIndex) { + if (child->getParentJointIndex() == jointIndex && + child->getNestableType() != NestableType::Overlay) { result.push_back(child->getID()); } });