don't include overlays in results from EntityScriptingInterface::getChildrenIDsOfJoint

This commit is contained in:
Seth Alves 2017-01-15 11:27:29 -08:00
parent 7ab3e60f36
commit 3b4f5e3023

View file

@ -1336,11 +1336,11 @@ bool EntityScriptingInterface::isChildOfParent(QUuid childID, QUuid parentID) {
parent->forEachDescendant([&](SpatiallyNestablePointer descendant) { parent->forEachDescendant([&](SpatiallyNestablePointer descendant) {
if(descendant->getID() == childID) { if(descendant->getID() == childID) {
isChild = true; isChild = true;
return; return;
} }
}); });
}); });
return isChild; return isChild;
} }
@ -1364,7 +1364,8 @@ QVector<QUuid> EntityScriptingInterface::getChildrenIDsOfJoint(const QUuid& pare
return; return;
} }
parent->forEachChild([&](SpatiallyNestablePointer child) { parent->forEachChild([&](SpatiallyNestablePointer child) {
if (child->getParentJointIndex() == jointIndex) { if (child->getParentJointIndex() == jointIndex &&
child->getNestableType() != NestableType::Overlay) {
result.push_back(child->getID()); result.push_back(child->getID());
} }
}); });