Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/SelectionList.cpp
void SelectionList::Add(SelectionList& selection)
    {
        // get the number of selected objects
        const size_t numSelectedNodes           = selection.GetNumSelectedNodes();
        const size_t numSelectedActors          = selection.GetNumSelectedActors();
        const size_t numSelectedActorInstances  = selection.GetNumSelectedActorInstances();
        const size_t numSelectedMotions         = selection.GetNumSelectedMotions();
        const size_t numSelectedMotionInstances = selection.GetNumSelectedMotionInstances();
        const size_t numSelectedAnimGraphs      = selection.GetNumSelectedAnimGraphs();

        // iterate through all nodes and select them
        for (size_t i = 0; i < numSelectedNodes; ++i)
        {
            AddNode(selection.GetNode(i));
        }

        // iterate through all actors and select them
        for (size_t i = 0; i < numSelectedActors; ++i)
        {
            AddActor(selection.GetActor(i));
        }

        // iterate through all actor instances and select them
        for (size_t i = 0; i < numSelectedActorInstances; ++i)
        {
            AddActorInstance(selection.GetActorInstance(i));
        }

        // iterate through all motions and select them
        for (size_t i = 0; i < numSelectedMotions; ++i)
        {
            AddMotion(selection.GetMotion(i));
        }

        // iterate through all motion instances and select them
        for (size_t i = 0; i < numSelectedMotionInstances; ++i)
        {
            AddMotionInstance(selection.GetMotionInstance(i));
        }

        // iterate through all anim graphs and select them
        for (size_t i = 0; i < numSelectedAnimGraphs; ++i)
        {
            AddAnimGraph(selection.GetAnimGraph(i));
        }
    }
// add a complete selection list to this one
add a complete selection list to this one
add a complete selection list to this one
void SelectionList::Add(SelectionList& selection)
    {
        const size_t numSelectedNodes           = selection.GetNumSelectedNodes();
        const size_t numSelectedActors          = selection.GetNumSelectedActors();
        const size_t numSelectedActorInstances  = selection.GetNumSelectedActorInstances();
        const size_t numSelectedMotions         = selection.GetNumSelectedMotions();
        const size_t numSelectedMotionInstances = selection.GetNumSelectedMotionInstances();
        const size_t numSelectedAnimGraphs      = selection.GetNumSelectedAnimGraphs();
        for (size_t i = 0; i < numSelectedNodes; ++i)
        {
            AddNode(selection.GetNode(i));
        }
        for (size_t i = 0; i < numSelectedActors; ++i)
        {
            AddActor(selection.GetActor(i));
        }
        for (size_t i = 0; i < numSelectedActorInstances; ++i)
        {
            AddActorInstance(selection.GetActorInstance(i));
        }
        for (size_t i = 0; i < numSelectedMotions; ++i)
        {
            AddMotion(selection.GetMotion(i));
        }
        for (size_t i = 0; i < numSelectedMotionInstances; ++i)
        {
            AddMotionInstance(selection.GetMotionInstance(i));
        }
        for (size_t i = 0; i < numSelectedAnimGraphs; ++i)
        {
            AddAnimGraph(selection.GetAnimGraph(i));
        }
    }
void SelectionList :: Add ( SelectionList & selection ) { const size_t numSelectedNodes = selection . GetNumSelectedNodes ( ) ; const size_t numSelectedActors = selection . GetNumSelectedActors ( ) ; const size_t numSelectedActorInstances = selection . GetNumSelectedActorInstances ( ) ; const size_t numSelectedMotions = selection . GetNumSelectedMotions ( ) ; const size_t numSelectedMotionInstances = selection . GetNumSelectedMotionInstances ( ) ; const size_t numSelectedAnimGraphs = selection . GetNumSelectedAnimGraphs ( ) ; for ( size_t i = 0 ; i < numSelectedNodes ; ++ i ) { AddNode ( selection . GetNode ( i ) ) ; } for ( size_t i = 0 ; i < numSelectedActors ; ++ i ) { AddActor ( selection . GetActor ( i ) ) ; } for ( size_t i = 0 ; i < numSelectedActorInstances ; ++ i ) { AddActorInstance ( selection . GetActorInstance ( i ) ) ; } for ( size_t i = 0 ; i < numSelectedMotions ; ++ i ) { AddMotion ( selection . GetMotion ( i ) ) ; } for ( size_t i = 0 ; i < numSelectedMotionInstances ; ++ i ) { AddMotionInstance ( selection . GetMotionInstance ( i ) ) ; } for ( size_t i = 0 ; i < numSelectedAnimGraphs ; ++ i ) { AddAnimGraph ( selection . GetAnimGraph ( i ) ) ; } }
add a complete selection list to this one
add a complete selection list to this one
// get the number of selected objects // iterate through all nodes and select them // iterate through all actors and select them // iterate through all actor instances and select them // iterate through all motions and select them // iterate through all motion instances and select them // iterate through all anim graphs and select them