Gems/EMotionFX/Code/EMotionFX/Source/MotionLayerSystem.cpp
MotionInstance* MotionLayerSystem::FindFirstNonMixingMotionInstance() const
    {
        // if there aren't any motion instances, return nullptr
        const auto foundMotionInstance = AZStd::find_if(begin(m_motionInstances), end(m_motionInstances), [](const MotionInstance* motionInstance)
        {
            return !motionInstance->GetIsMixing();
        });
        return foundMotionInstance != end(m_motionInstances) ? *foundMotionInstance : nullptr;
    }
// recursively find the first layer (top down search) which has a motion layer which is not in mixing mode
recursively find the first layer (top down search) which has a motion layer which is not in mixing mode
recursively find the first layer ( top down search ) which has a motion layer which is not in mixing mode
MotionInstance* MotionLayerSystem::FindFirstNonMixingMotionInstance() const
    {
        const auto foundMotionInstance = AZStd::find_if(begin(m_motionInstances), end(m_motionInstances), [](const MotionInstance* motionInstance)
        {
            return !motionInstance->GetIsMixing();
        });
        return foundMotionInstance != end(m_motionInstances) ? *foundMotionInstance : nullptr;
    }
MotionInstance * MotionLayerSystem :: FindFirstNonMixingMotionInstance ( ) const { const auto foundMotionInstance = AZStd :: find_if ( begin ( m_motionInstances ) , end ( m_motionInstances ) , [ ] ( const MotionInstance * motionInstance ) { return ! motionInstance -> GetIsMixing ( ) ; } ) ; return foundMotionInstance != end ( m_motionInstances ) ? * foundMotionInstance : nullptr ; }
recursively find the first layer (top down search) which has a motion layer which is not in mixing mode
recursively find the first layer ( top down search ) which has a motion layer which is not in mixing mode
// if there aren't any motion instances, return nullptr