Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/NodeGroups/NodeGroupsPlugin.cpp
void NodeGroupsPlugin::ReInit()
    {
        // get the selected actor instance
        const CommandSystem::SelectionList& selection       = CommandSystem::GetCommandManager()->GetCurrentSelection();
        EMotionFX::ActorInstance*           actorInstance   = selection.GetSingleActorInstance();

        // show hint if no/multiple actor instances is/are selected
        if (actorInstance == nullptr)
        {
            m_currentActor = nullptr;
            m_nodeGroupWidget->SetActor(nullptr);
            m_nodeGroupWidget->SetNodeGroup(nullptr);
            m_nodeGroupManagementWidget->SetActor(nullptr);
            return;
        }

        // get the corresponding actor
        EMotionFX::Actor* actor = actorInstance->GetActor();

        // only reinit the node groups window if actorinstance changed
        if (m_currentActor != actor)
        {
            // set the new actor
            m_currentActor = actor;

            // set the new actor on each widget
            m_nodeGroupWidget->SetActor(m_currentActor);
            m_nodeGroupManagementWidget->SetActor(m_currentActor);
        }

        // set the dialog stack as main widget
        m_dock->setWidget(m_dialogStack);

        // update the interface
        UpdateInterface();
    }
// reinit the node groups dialog, e.g. if selection changes
reinit the node groups dialog, e.g. if selection changes
reinit the node groups dialog e . g . if selection changes
void NodeGroupsPlugin::ReInit()
    {
        const CommandSystem::SelectionList& selection       = CommandSystem::GetCommandManager()->GetCurrentSelection();
        EMotionFX::ActorInstance*           actorInstance   = selection.GetSingleActorInstance();
        if (actorInstance == nullptr)
        {
            m_currentActor = nullptr;
            m_nodeGroupWidget->SetActor(nullptr);
            m_nodeGroupWidget->SetNodeGroup(nullptr);
            m_nodeGroupManagementWidget->SetActor(nullptr);
            return;
        }
        EMotionFX::Actor* actor = actorInstance->GetActor();
        if (m_currentActor != actor)
        {
            m_currentActor = actor;
             on each widget
            m_nodeGroupWidget->SetActor(m_currentActor);
            m_nodeGroupManagementWidget->SetActor(m_currentActor);
        }
        m_dock->setWidget(m_dialogStack);
        UpdateInterface();
    }
void NodeGroupsPlugin :: ReInit ( ) { const CommandSystem :: SelectionList & selection = CommandSystem :: GetCommandManager ( ) -> GetCurrentSelection ( ) ; EMotionFX :: ActorInstance * actorInstance = selection . GetSingleActorInstance ( ) ; if ( actorInstance == nullptr ) { m_currentActor = nullptr ; m_nodeGroupWidget -> SetActor ( nullptr ) ; m_nodeGroupWidget -> SetNodeGroup ( nullptr ) ; m_nodeGroupManagementWidget -> SetActor ( nullptr ) ; return ; } EMotionFX :: Actor * actor = actorInstance -> GetActor ( ) ; if ( m_currentActor != actor ) { m_currentActor = actor ; m_nodeGroupWidget -> SetActor ( m_currentActor ) ; m_nodeGroupManagementWidget -> SetActor ( m_currentActor ) ; } m_dock -> setWidget ( m_dialogStack ) ; UpdateInterface ( ) ; }
reinit the node groups dialog, e.g.
reinit the node groups dialog e . g .
// get the selected actor instance // show hint if no/multiple actor instances is/are selected // get the corresponding actor // only reinit the node groups window if actorinstance changed // set the new actor // set the new actor on each widget // set the dialog stack as main widget // update the interface