Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphPlugin.cpp
// double clicked a node history item in the timeview plugin
double clicked a node history item in the timeview plugin
double clicked a node history item in the timeview plugin
void AnimGraphPlugin::OnDoubleClickedRecorderNodeHistoryItem(EMotionFX::Recorder::ActorInstanceData* actorInstanceData, EMotionFX::Recorder::NodeHistoryItem* historyItem)
    {
        MCORE_UNUSED(actorInstanceData);
        EMotionFX::AnimGraph* animGraph = EMotionFX::GetAnimGraphManager().FindAnimGraphByID(historyItem->m_animGraphId);
        if (animGraph == nullptr)
        {
            QMessageBox::warning(m_dock, "Cannot Find Anim Graph", "The anim graph used by this node cannot be located anymore, did you delete it?", QMessageBox::Ok);
            return;
        }
        EMotionFX::AnimGraphNode* foundNode = animGraph->RecursiveFindNodeById(historyItem->m_nodeId);
        if (foundNode == nullptr)
        {
            QMessageBox::warning(m_dock, "Cannot Find Node", "The anim graph node cannot be found. Did you perhaps delete the node or change animgraph?", QMessageBox::Ok);
            return;
        }
        EMotionFX::AnimGraphNode* nodeToShow = foundNode->GetParentNode();
        if (nodeToShow)
        {
            const QModelIndex modelIndex = m_animGraphModel->FindFirstModelIndex(nodeToShow);
            m_animGraphModel->Focus(modelIndex);
        }
    }
void AnimGraphPlugin :: OnDoubleClickedRecorderNodeHistoryItem ( EMotionFX :: Recorder :: ActorInstanceData * actorInstanceData , EMotionFX :: Recorder :: NodeHistoryItem * historyItem ) { MCORE_UNUSED ( actorInstanceData ) ; EMotionFX :: AnimGraph * animGraph = EMotionFX :: GetAnimGraphManager ( ) . FindAnimGraphByID ( historyItem -> m_animGraphId ) ; if ( animGraph == nullptr ) { QMessageBox :: warning ( m_dock , " " , " " , QMessageBox :: Ok ) ; return ; } EMotionFX :: AnimGraphNode * foundNode = animGraph -> RecursiveFindNodeById ( historyItem -> m_nodeId ) ; if ( foundNode == nullptr ) { QMessageBox :: warning ( m_dock , " " , " " , QMessageBox :: Ok ) ; return ; } EMotionFX :: AnimGraphNode * nodeToShow = foundNode -> GetParentNode ( ) ; if ( nodeToShow ) { const QModelIndex modelIndex = m_animGraphModel -> FindFirstModelIndex ( nodeToShow ) ; m_animGraphModel -> Focus ( modelIndex ) ; } }
double clicked a node history item in the timeview plugin
double clicked a node history item in the timeview plugin
// try to locate the node based on its unique ID // show the graph and notify about the selection change