优化导出与保存

This commit is contained in:
Sch 2023-08-15 20:02:41 +08:00
parent f64c823cb4
commit 1ca42f8ed8
6 changed files with 132 additions and 57 deletions

View File

@ -482,6 +482,13 @@ FString FUtils::GetMsFromString(FString TimeString)
return FString::FromInt(Milliseconds);
}
FString FUtils::Color2Hex3(FColor Color)
{
return FString::Printf(TEXT("%02X%02X%02X"), Color.R, Color.G, Color.B);
}
FSaveModifier::FSaveModifier(const FString& FullSavedPath)
{
this->FullSavedPath = FullSavedPath;

View File

@ -26,6 +26,7 @@ public:
static TArray<FEncodeVideoInfo> TrackEncodeAudio(const FTrackData& TrackData, const FString& ExportPath);
static FString CurtainFullPath(const FString& GroupName)
{
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, FGlobalData::BasePath);
return FPaths::Combine(FGlobalData::BasePath, FGlobalData::CurrentProjectName, TEXT("Curtain"), GroupName + TEXT(".bin"));
};
static FString GroupFullPath(const FString& GroupName)
@ -75,6 +76,7 @@ public:
static FString GetMsFromString(FString TimeString);
static FString Color2Hex3(FColor Color);
};
class FSaveModifier

View File

@ -177,6 +177,10 @@ void DragDropOperator::OnDrop(const FGeometry& MyGeometry, const FDragDropEvent&
NewClipData.ClipEndFrame = (MyGeometry.AbsoluteToLocal(DragDropEvent.GetScreenSpacePosition()).X + 100) / FGlobalData::DefaultTimeTickSpace;
if (PresetDragOperation->PresetData.PresetType == EPresetType::Color)
{
if (PresetDragOperation->PresetData.Colors.Num() == 0)
{
PresetDragOperation->PresetData.Colors.Add(FLinearColor(1, 0, 0, 1));
}
NewClipData.ClipColors.Add(PresetDragOperation->PresetData.Colors[0]);
}
else

View File

@ -601,7 +601,10 @@ void SCutMainWindow::OpenTimeline(const FString& TimelineName, bool NeedSaveBefo
void SCutMainWindow::OpenProject(const FString& Project)
{
FGlobalData::BasePath = Project;
// 得到Project的上一级目录
CurtainPanel->Groups.Empty();
CurtainPanel->CallRender();
// 加载项目关联文件 .cutlink
TArray<uint8> Data;
@ -618,6 +621,7 @@ void SCutMainWindow::OpenProject(const FString& Project)
FGlobalData::CurrentProjectName = FPaths::GetBaseFilename(FPaths::GetCleanFilename(CutlinkName[0]));
FGlobalData::BasePath = Project.LeftChop(FGlobalData::CurrentProjectName.Len()) ;
FFileHelper::LoadFileToArray(Data, *FPaths::Combine(Project, FPaths::GetCleanFilename(CutlinkName[0])));
FMemoryReader Reader(Data);
@ -664,11 +668,26 @@ void SCutMainWindow::OpenProject(const FString& Project)
// 记录所有组轨道链接
CutTimeline->DeviceTrackGroups.Empty();
CutTimeline->TrackGroupInstances.Empty();
int32 GroupTrackNum = 0;
Reader << GroupTrackNum;
CutTimeline->DeviceTrackGroups.Init(FDeviceTrackGroup(), GroupTrackNum);
for (int32 i = 0; i < GroupTrackNum; i++)
{
Reader << CutTimeline->DeviceTrackGroups[i];
for (int32 j = 0; j < CutTimeline->DeviceTrackGroups[i].DeviceTracks.Num(); j++)
{
CutTimeline->DeviceTrackGroups[i].DeviceTracks[j].DeviceTrackGroup = &CutTimeline->DeviceTrackGroups[i];
FTrackData TrackData = FTrackData(CutTimeline->DeviceTrackGroups[i].DeviceTracks[j].DeviceName, CutTimeline->DeviceTrackGroups[i].DeviceTracks[j].DeviceType, CutTimeline->DeviceTrackGroups[i].DeviceTracks[j]);
const TSharedPtr<STrackHead> NewTrackHead = SNew(STrackHead).TrackData(TrackData).CutTimeline(CutTimeline.ToSharedRef()).MainWidgetInterface(this).GroupName(CutTimeline->DeviceTrackGroups[i].GroupName);
const TSharedPtr<STrackBody> NewTrackBody = SNew(STrackBody).TrackHead(NewTrackHead).MainWidgetInterface(this);
NewTrackBody->CallRender();
CutTimeline->TrackGroupInstances.Add(FSingleTrackGroupInstance(NewTrackHead, NewTrackBody, CutTimeline->DeviceTrackGroups[i].GroupName));
}
CutTimeline->RenderGroup();
}
@ -699,11 +718,12 @@ void SCutMainWindow::ExportProject(const FString& ExportPath)
FPlatformFileManager::Get().GetPlatformFile().CreateDirectoryTree(*FGlobalData::ExportPath);
FPlatformFileManager::Get().GetPlatformFile().CreateDirectoryTree(*(FGlobalData::ExportPath / "video"));
FPlatformFileManager::Get().GetPlatformFile().CreateDirectoryTree(*(FGlobalData::ExportPath / "audio"));
FPlatformFileManager::Get().GetPlatformFile().CreateDirectoryTree(*(FGlobalData::ExportPath / "sound"));
FPlatformFileManager::Get().GetPlatformFile().CreateDirectoryTree(*(FGlobalData::ExportPath / "psaf"));
tinyxml2::XMLDocument Document;
tinyxml2::XMLElement* RootElement = Document.NewElement(TCHAR_TO_UTF8(*FString::Printf(TEXT("Project Name=\"%s\""), *FGlobalData::CurrentProjectName)));
tinyxml2::XMLElement* RootElement = Document.NewElement("Project");
RootElement->SetAttribute("Name", TCHAR_TO_UTF8(*FGlobalData::CurrentProjectName));
Document.InsertFirstChild(RootElement);
tinyxml2::XMLElement* Standard = RootElement->InsertNewChildElement("Standard");
tinyxml2::XMLElement* File = Standard->InsertNewChildElement("File");
@ -729,11 +749,11 @@ void SCutMainWindow::ExportProject(const FString& ExportPath)
{
switch (TrackData.DeviceType)
{
case ETrackType::PlayerTrack:
case ETrackType::AtomSphereLightTrack:
{
tinyxml2::XMLElement* PlayerLight = PlayerLightList->InsertNewChildElement("PlayerLight");
PlayerLight->InsertNewChildElement("ID")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(DeviceID)));
PlayerLight->InsertNewChildElement("RoleName")->InsertNewText(TCHAR_TO_UTF8(*TrackData.DeviceName));
PlayerLight->InsertNewChildElement("RoleName")->InsertNewText(TCHAR_TO_UTF8(*TrackData.DeviceTrackGroup->GroupName));
DeviceID++;
}
break;
@ -789,18 +809,24 @@ void SCutMainWindow::ExportProject(const FString& ExportPath)
Card->InsertNewChildElement("Step");
Card->InsertNewChildElement("SpecialEffectID")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(EffectCardsPanel->EffectCardGroups[i].Cards[j].ID)));
Card->InsertNewChildElement("SerialNumberList");
}
}
else
{
tinyxml2::XMLElement* Card = CardList->InsertNewChildElement("Card");
Card->InsertNewChildElement("ID")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(EffectCardsPanel->EffectCardGroups[i].ID)));
Card->InsertNewChildElement("Type")->InsertNewText(EffectCardsPanel->EffectCardGroups[0].bIsDedicated ? "0" : "2");
Card->InsertNewChildElement("Times");
Card->InsertNewChildElement("Step");
Card->InsertNewChildElement("SpecialEffectID")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(EffectCardsPanel->EffectCardGroups[i].ID)));
Card->InsertNewChildElement("SerialNumberList");
for (int32 j = 0; j < EffectCardsPanel->EffectCardGroups[i].Cards.Num(); j++)
{
tinyxml2::XMLElement* Card = CardList->InsertNewChildElement("Card");
Card->InsertNewChildElement("ID")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(EffectCardsPanel->EffectCardGroups[i].ID)));
Card->InsertNewChildElement("Type")->InsertNewText(EffectCardsPanel->EffectCardGroups[0].bIsDedicated ? "0" : "2");
Card->InsertNewChildElement("Times");
Card->InsertNewChildElement("Step");
Card->InsertNewChildElement("SpecialEffectID")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(EffectCardsPanel->EffectCardGroups[i].ID)));
tinyxml2::XMLElement* SerialNumberList = Card->InsertNewChildElement("SerialNumberList");
for (int32 k = 0; k < EffectCardsPanel->EffectCardGroups[i].Cards.Num(); k++)
{
SerialNumberList->InsertNewChildElement("SerialNumber")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(EffectCardsPanel->EffectCardGroups[i].Cards[k].ID)));
}
}
}
}
@ -809,19 +835,29 @@ void SCutMainWindow::ExportProject(const FString& ExportPath)
tinyxml2::XMLElement* Keyboard = RootElement->InsertNewChildElement("KeyBoard");
}
// ProcessList
tinyxml2::XMLElement* ProcessList = RootElement->InsertNewChildElement("ProcessList");
for (int32 i = 0; i < CurtainPanel->Groups.Num(); i++)
{
GetProcessA(RootElement, &CurtainPanel->Groups[i]);
GetProcessA(ProcessList, &CurtainPanel->Groups[i]);
}
GetSpecialEffectList(RootElement);
FString XMLExportPath = FPaths::ConvertRelativePathToFull(FPaths::Combine(ExportPath, FGlobalData::CurrentProjectName, FGlobalData::CurrentProjectName + TEXT(".xml")));
FString XMLExportPath = FPaths::ConvertRelativePathToFull(FPaths::Combine(ExportPath, FGlobalData::CurrentProjectName, TEXT("Process.xml")));
TArray<uint8> Data;
const TArray64<uint8> SaveData(Data);
FFileHelper::SaveArrayToFile(SaveData, *XMLExportPath);
FFileHelper::SaveArrayToFile(Data, *XMLExportPath);
//GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, XMLExportPath);
FFileHelper::SaveArrayToFile(Data, TEXT("C:\\temp\\Process.xml"));
tinyxml2::XMLError NewError = Document.SaveFile("C:\\temp\\Process.xml");
if (NewError)
{
check(false)
}
IFileManager::Get().Move(*XMLExportPath, TEXT("C:\\temp\\Process.xml"), true, true, false, false);
Document.SaveFile(TCHAR_TO_UTF8(*XMLExportPath));
}
void SCutMainWindow::ImportProject(const FString& ImportPath)
@ -864,6 +900,7 @@ void SCutMainWindow::SaveProject()
// 根 << 记录所有导入资产链接
// 根 << 记录所有幕
// 根 << 记录所有组轨道链接
CutTimeline->SaveTimeline(CutTimeline->TimelineInfo.CurrentOpenFullPath, CutTimeline->TimelineInfo);
// 新建项目关联文件.cutlink
TArray<uint8> ProjectLinkData;
@ -1044,7 +1081,24 @@ tinyxml2::XMLElement* SCutMainWindow::GetDeviceElement(tinyxml2::XMLElement* Par
// DMLightList
tinyxml2::XMLElement* DMLightList = Light->InsertNewChildElement("DMLightList");
{
int32 j = 0;
for (int32 i = 0; i < CutTimeline->TrackGroupInstances.Num(); i++)
{
const FTrackData& TrackData = StaticCastSharedPtr<STrackHead>(CutTimeline->TrackGroupInstances[i].Head)->TrackData;
if (TrackData.TrackType == ETrackType::SpotLightTrack)
{
tinyxml2::XMLElement* Event_List = DMLightList->InsertNewChildElement(TCHAR_TO_UTF8(*FString::Printf(TEXT("DMLight(%d)"), j)))->InsertNewChildElement("Event_List");
for (int32 k = 0; k < TrackData.ClipData.Num(); k++)
{
const FClipData& TempClipData = TrackData.ClipData[k];
Event_List->InsertNewChildElement("Value")->InsertNewText("1");
Event_List->InsertNewChildElement("Timecode")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *FUtils::GetMsFromString(FGlobalData::GetTimeData(TempClipData.ClipStartFrame)))));
Event_List->InsertNewChildElement("Value")->InsertNewText("0");
Event_List->InsertNewChildElement("Timecode")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *FUtils::GetMsFromString(FGlobalData::GetTimeData(TempClipData.ClipEndFrame)))));
}
}
}
}
tinyxml2::XMLElement* PlayerLightList = Light->InsertNewChildElement("PlayerLightList");
{
@ -1064,8 +1118,8 @@ tinyxml2::XMLElement* SCutMainWindow::GetDeviceElement(tinyxml2::XMLElement* Par
{
tinyxml2::XMLElement* NewSpeicalEffect = SpeicalEffect->InsertNewChildElement("Special_Effect");
NewSpeicalEffect->InsertNewChildElement("Mode")->InsertNewText("0");
NewSpeicalEffect->InsertNewChildElement("InitialColor")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *TempClipData.PresetsCustomData.Colors[0].ToFColor(false).ToHex())));
NewSpeicalEffect->InsertNewChildElement("EndColor")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *FLinearColor::Black.ToFColor(false).ToHex())));
NewSpeicalEffect->InsertNewChildElement("InitialColor")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *FUtils::Color2Hex3(TempClipData.PresetsCustomData.Colors[0].ToFColor(false)))));
NewSpeicalEffect->InsertNewChildElement("EndColor")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *FUtils::Color2Hex3(FLinearColor::Black.ToFColor(false)))));
float PerLength = (TempClipData.PresetsCustomData.Time / TempClipData.PresetsCustomData.Times);
NewSpeicalEffect->InsertNewChildElement("TimeLength")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%d"), int32(PerLength * 1000))));
NewSpeicalEffect->InsertNewChildElement("TimeCode")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *FUtils::GetMsFromString(FGlobalData::GetTimeData(TempClipData.ClipStartFrame)))));
@ -1075,8 +1129,8 @@ tinyxml2::XMLElement* SCutMainWindow::GetDeviceElement(tinyxml2::XMLElement* Par
{
tinyxml2::XMLElement* NewSpeicalEffect = SpeicalEffect->InsertNewChildElement("Special_Effect");
NewSpeicalEffect->InsertNewChildElement("Mode")->InsertNewText("0");
NewSpeicalEffect->InsertNewChildElement("InitialColor")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *TempClipData.PresetsCustomData.Colors[0].ToFColor(false).ToHex())));
NewSpeicalEffect->InsertNewChildElement("EndColor")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *TempClipData.PresetsCustomData.Colors[0].ToFColor(false).ToHex())));
NewSpeicalEffect->InsertNewChildElement("InitialColor")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *FUtils::Color2Hex3(TempClipData.PresetsCustomData.Colors[0].ToFColor(false)))));
NewSpeicalEffect->InsertNewChildElement("EndColor")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *FUtils::Color2Hex3(TempClipData.PresetsCustomData.Colors[0].ToFColor(false)))));
float PerLength = (TempClipData.PresetsCustomData.Time / TempClipData.PresetsCustomData.Times) / 2;
NewSpeicalEffect->InsertNewChildElement("TimeLength")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%d"), int32(PerLength * 1000))));
NewSpeicalEffect->InsertNewChildElement("TimeCode")->InsertNewText(TCHAR_TO_UTF8(*FString::Printf(TEXT("%ls"), *FUtils::GetMsFromString(FGlobalData::GetTimeData(TempClipData.ClipStartFrame)))));
@ -1252,7 +1306,7 @@ tinyxml2::XMLElement* SCutMainWindow::GetSoundListElement(tinyxml2::XMLElement*
StaticCastSharedPtr<STrackHead>(CutTimeline->TrackGroupInstances[i].Head)->TrackData.TrackType == ETrackType::AudioTrackR)
{
FString Filename = FGuid::NewGuid().ToString();
FString NewExportFilePath = FGlobalData::ExportPath / "audio" / Filename;
FString NewExportFilePath = FGlobalData::ExportPath / "sound" / Filename;
TArray<FEncodeVideoInfo> EncodeVideoInfos = FUtils::TrackEncodeAudio(StaticCastSharedPtr<STrackHead>(CutTimeline->TrackGroupInstances[i].Head)->TrackData, NewExportFilePath);
for (FEncodeVideoInfo EncodeVideoInfo : EncodeVideoInfos)
{
@ -1266,7 +1320,8 @@ tinyxml2::XMLElement* SCutMainWindow::GetSoundListElement(tinyxml2::XMLElement*
tinyxml2::XMLElement* SCutMainWindow::GetProcessA(tinyxml2::XMLElement* Parent, FCurtainGroup* CurtainGroup)
{
tinyxml2::XMLElement* ProcessA = Parent->InsertNewChildElement(TCHAR_TO_UTF8(*CurtainGroup->GroupName));
tinyxml2::XMLElement* ProcessA = Parent->InsertNewChildElement("ProcessA");
ProcessA->SetAttribute("Name", TCHAR_TO_UTF8(*CurtainGroup->GroupName));
for (int32 i = 0; i < CurtainGroup->Curtains.Num(); i++)
{
OpenTimeline(CurtainGroup->Curtains[i].TimelineInfo.CurrentOpenFullPath, true, true);
@ -1277,7 +1332,8 @@ tinyxml2::XMLElement* SCutMainWindow::GetProcessA(tinyxml2::XMLElement* Parent,
tinyxml2::XMLElement* SCutMainWindow::GetProcessB(tinyxml2::XMLElement* Parent, FCurtain* Curtain)
{
tinyxml2::XMLElement* ProcessB = Parent->InsertNewChildElement(TCHAR_TO_UTF8(*Curtain->CurtainName));
tinyxml2::XMLElement* ProcessB = Parent->InsertNewChildElement("ProcessB");
ProcessB->SetAttribute("Name", TCHAR_TO_UTF8(*Curtain->CurtainName));
tinyxml2::XMLElement* ProcessID = ProcessB->InsertNewChildElement("ID");
tinyxml2::XMLElement* AutoNext = ProcessB->InsertNewChildElement("AutoNext");
tinyxml2::XMLElement* TimeLength = ProcessB->InsertNewChildElement("TimeLength");
@ -1337,50 +1393,56 @@ tinyxml2::XMLElement* SCutMainWindow::GetSpecialEffectList(tinyxml2::XMLElement*
tinyxml2::XMLElement* SCutMainWindow::GetSpecialEffectGroup(tinyxml2::XMLElement* Parent, FEffectCardGroup* Group)
{
tinyxml2::XMLElement* SpecialEffect = Parent->InsertNewChildElement(TCHAR_TO_UTF8(*Group->GroupName));
tinyxml2::XMLElement* ID = SpecialEffect->InsertNewChildElement("ID");
tinyxml2::XMLElement* SpecialEffect = Parent->InsertNewChildElement("SpecialEffect");
tinyxml2::XMLElement* Effect = SpecialEffect->InsertNewChildElement("Effect");
Effect->SetAttribute("Name", TCHAR_TO_UTF8(*Group->GroupName));
tinyxml2::XMLElement* ID = Effect->InsertNewChildElement("ID");
{
ID->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(Group->ID)));
}
tinyxml2::XMLElement* AutoNext = SpecialEffect->InsertNewChildElement("AutoNext");
GetSoundListElement(SpecialEffect);
GetDeviceElement(SpecialEffect);
GetVideoListElement(SpecialEffect);
tinyxml2::XMLElement* IsGlobal = SpecialEffect->InsertNewChildElement("IsGlobal");
tinyxml2::XMLElement* AutoNext = Effect->InsertNewChildElement("AutoNext");
GetSoundListElement(Effect);
GetDeviceElement(Effect);
GetVideoListElement(Effect);
tinyxml2::XMLElement* IsGlobal = Effect->InsertNewChildElement("IsGlobal");
{
int32 bIsGlobal = 0;
Group->UsedCurtains.Contains(TEXT("全局")) ? bIsGlobal = 1 : bIsGlobal = 0;
IsGlobal->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(bIsGlobal)));
}
tinyxml2::XMLElement* State = SpecialEffect->InsertNewChildElement("State");
tinyxml2::XMLElement* State = Effect->InsertNewChildElement("State");
{
}
return SpecialEffect;
return Effect;
}
tinyxml2::XMLElement* SCutMainWindow::GetSpecialEffect(tinyxml2::XMLElement* Parent, FEffectCardProperty* Effect)
{
tinyxml2::XMLElement* SpecialEffect = Parent->InsertNewChildElement(TCHAR_TO_UTF8(*Effect->Name));
tinyxml2::XMLElement* ID = SpecialEffect->InsertNewChildElement("ID");
tinyxml2::XMLElement* SpecialEffect = Parent->InsertNewChildElement("SpecialEffect");
tinyxml2::XMLElement* Effectxml = SpecialEffect->InsertNewChildElement("Effect");
Effectxml->SetAttribute("Name", TCHAR_TO_UTF8(*Effect->Name));
tinyxml2::XMLElement* ID = Effectxml->InsertNewChildElement("ID");
{
ID->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(Effect->ID)));
}
tinyxml2::XMLElement* AutoNext = SpecialEffect->InsertNewChildElement("AutoNext");
GetSoundListElement(SpecialEffect);
GetDeviceElement(SpecialEffect);
GetVideoListElement(SpecialEffect);
tinyxml2::XMLElement* IsGlobal = SpecialEffect->InsertNewChildElement("IsGlobal");
tinyxml2::XMLElement* AutoNext = Effectxml->InsertNewChildElement("AutoNext");
GetSoundListElement(Effectxml);
GetDeviceElement(Effectxml);
GetVideoListElement(Effectxml);
tinyxml2::XMLElement* IsGlobal = Effectxml->InsertNewChildElement("IsGlobal");
{
int32 bIsGlobal = 0;
Effect->UsedCurtains.Contains(TEXT("全局")) ? bIsGlobal = 1 : bIsGlobal = 0;
IsGlobal->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(bIsGlobal)));
}
tinyxml2::XMLElement* State = SpecialEffect->InsertNewChildElement("State");
tinyxml2::XMLElement* State = Effectxml->InsertNewChildElement("State");
{
}
return SpecialEffect;
return Effectxml;
}

View File

@ -276,6 +276,7 @@ void SCutTimeline::Construct(const FArguments& InArgs)
.OnUserScrolled_Lambda([this](float ScrollValue)
{
TrackHeadScrollBox->SetScrollOffset(ScrollValue);
TrackGroupScrollBox->SetScrollOffset(ScrollValue);
})
]
]
@ -412,7 +413,7 @@ void SCutTimeline::SetAutoPlay(bool bStart)
void SCutTimeline::OnGroupNameEdited(FString NewText, FString OldText)
{
for (FTrackGroup& TrackGroup : TrackGroups)
for (FDeviceTrackGroup& TrackGroup : DeviceTrackGroups)
{
if (TrackGroup.GroupName == OldText)
{
@ -695,13 +696,12 @@ void SCutTimeline::AddNewDeviceToGroup(FString GroupName, FDeviceTrack DeviceTra
}
if (bIsFind != true)
{
FDeviceTrackGroup NewDeviceTrackGroup;
NewDeviceTrackGroup.DeviceTracks.Add(DeviceTrack);
NewDeviceTrackGroup.GroupName = GroupName;
NewDeviceTrackGroup.GroupType = GroupTrack;
DeviceTrackGroups.Add(NewDeviceTrackGroup);
DeviceTrack.DeviceTrackGroup = DeviceTrackGroups.GetData() + DeviceTrackGroups.Num() - 1;
FDeviceTrackGroup* NewDeviceTrackGroup = new FDeviceTrackGroup();
DeviceTrack.DeviceTrackGroup = NewDeviceTrackGroup;
NewDeviceTrackGroup->DeviceTracks.Add(DeviceTrack);
NewDeviceTrackGroup->GroupName = GroupName;
NewDeviceTrackGroup->GroupType = GroupTrack;
DeviceTrackGroups.Add(*NewDeviceTrackGroup);
}
FTrackData TrackData;
TrackData.TrackName = DeviceTrack.DeviceName;