Gems/EMotionFX/Code/EMotionFX/Source/MotionManager.cpp
MotionSet* MotionManager::FindRootMotionSet(size_t index)
    {
        auto foundRootMotionSet = AZStd::find_if(begin(m_motionSets), end(m_motionSets), [iter = index](const MotionSet* motionSet) mutable
        {
            return motionSet->GetParentSet() == nullptr && iter-- == 0;
        });
        return foundRootMotionSet != end(m_motionSets) ? *foundRootMotionSet : nullptr;
    }
// find the given root motion set
find the given root motion set
find the given root motion set
MotionSet* MotionManager::FindRootMotionSet(size_t index)
    {
        auto foundRootMotionSet = AZStd::find_if(begin(m_motionSets), end(m_motionSets), [iter = index](const MotionSet* motionSet) mutable
        {
            return motionSet->GetParentSet() == nullptr && iter-- == 0;
        });
        return foundRootMotionSet != end(m_motionSets) ? *foundRootMotionSet : nullptr;
    }
MotionSet * MotionManager :: FindRootMotionSet ( size_t index ) { auto foundRootMotionSet = AZStd :: find_if ( begin ( m_motionSets ) , end ( m_motionSets ) , [ iter = index ] ( const MotionSet * motionSet ) mutable { return motionSet -> GetParentSet ( ) == nullptr && iter -- == 0 ; } ) ; return foundRootMotionSet != end ( m_motionSets ) ? * foundRootMotionSet : nullptr ; }
find the given root motion set
find the given root motion set