Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsWindow.cpp
void AttachmentsWindow::RemoveTableItems(const QList<QTableWidgetItem*>& items)
    {
        // import and start playing the animation
        AZStd::string outResult;
        MCore::CommandGroup group(AZStd::string("Remove Attachment Actor").c_str());

        // iterate trough all selected items
        for (const QTableWidgetItem* item : items)
        {
            if (item == nullptr || item->column() != 1)
            {
                continue;
            }

            // the attachment id
            const int id                    = GetIDFromTableRow(item->row());
            const AZStd::string nodeName    = GetNodeNameFromTableRow(item->row());

            group.AddCommandString(AZStd::string::format("RemoveAttachment -attachmentID %d -attachToID %i -attachToNode \"%s\"", id, m_actorInstance->GetID(), nodeName.c_str()).c_str());
        }

        // execute the group command
        GetCommandManager()->ExecuteCommandGroup(group, outResult);

        // Reinit the table
        ReInit();
    }
// removes a row from a table
removes a row from a table
removes a row from a table
void AttachmentsWindow::RemoveTableItems(const QList<QTableWidgetItem*>& items)
    {
        AZStd::string outResult;
        MCore::CommandGroup group(AZStd::string("Remove Attachment Actor").c_str());
        for (const QTableWidgetItem* item : items)
        {
            if (item == nullptr || item->column() != 1)
            {
                continue;
            }
            const int id                    = GetIDFromTableRow(item->row());
            const AZStd::string nodeName    = GetNodeNameFromTableRow(item->row());
            group.AddCommandString(AZStd::string::format("RemoveAttachment -attachmentID %d -attachToID %i -attachToNode \"%s\"", id, m_actorInstance->GetID(), nodeName.c_str()).c_str());
        }
        GetCommandManager()->ExecuteCommandGroup(group, outResult);
        ReInit();
    }
void AttachmentsWindow :: RemoveTableItems ( const QList < QTableWidgetItem * > & items ) { AZStd :: string outResult ; MCore :: CommandGroup group ( AZStd :: string ( " " ) . c_str ( ) ) ; for ( const QTableWidgetItem * item : items ) { if ( item == nullptr || item -> column ( ) != 1 ) { continue ; } const int id = GetIDFromTableRow ( item -> row ( ) ) ; const AZStd :: string nodeName = GetNodeNameFromTableRow ( item -> row ( ) ) ; group . AddCommandString ( AZStd :: string :: format ( " \" \" " , id , m_actorInstance -> GetID ( ) , nodeName . c_str ( ) ) . c_str ( ) ) ; } GetCommandManager ( ) -> ExecuteCommandGroup ( group , outResult ) ; ReInit ( ) ; }
removes a row from a table
removes a row from a table
// import and start playing the animation // iterate trough all selected items // the attachment id // execute the group command // Reinit the table