Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/SelectionList.cpp
EMotionFX::ActorInstance* SelectionList::GetSingleActorInstance() const
    {
        if (GetNumSelectedActorInstances() == 0)
        {
            //LogDebug("Cannot get single selected actor instance. No actor instance selected.");
            return nullptr;
        }

        if (GetNumSelectedActorInstances() > 1)
        {
            //LogDebug("Cannot get single selected actor instance. Multiple actor instances selected.");
            return nullptr;
        }

        EMotionFX::ActorInstance* actorInstance = m_selectedActorInstances[0];
        if (!actorInstance)
        {
            return nullptr;
        }

        if (actorInstance->GetIsOwnedByRuntime())
        {
            return nullptr;
        }

        return m_selectedActorInstances[0];
    }
// get a single selected actor instance
get a single selected actor instance
get a single selected actor instance
EMotionFX::ActorInstance* SelectionList::GetSingleActorInstance() const
    {
        if (GetNumSelectedActorInstances() == 0)
        {
            return nullptr;
        }
        if (GetNumSelectedActorInstances() > 1)
        {
            return nullptr;
        }
        EMotionFX::ActorInstance* actorInstance = m_selectedActorInstances[0];
        if (!actorInstance)
        {
            return nullptr;
        }
        if (actorInstance->GetIsOwnedByRuntime())
        {
            return nullptr;
        }
        return m_selectedActorInstances[0];
    }
EMotionFX :: ActorInstance * SelectionList :: GetSingleActorInstance ( ) const { if ( GetNumSelectedActorInstances ( ) == 0 ) { return nullptr ; } if ( GetNumSelectedActorInstances ( ) > 1 ) { return nullptr ; } EMotionFX :: ActorInstance * actorInstance = m_selectedActorInstances [ 0 ] ; if ( ! actorInstance ) { return nullptr ; } if ( actorInstance -> GetIsOwnedByRuntime ( ) ) { return nullptr ; } return m_selectedActorInstances [ 0 ] ; }
get a single selected actor instance
get a single selected actor instance
//LogDebug("Cannot get single selected actor instance. No actor instance selected."); //LogDebug("Cannot get single selected actor instance. Multiple actor instances selected.");