安装 XML 输出 XML

This commit is contained in:
Sch 2023-07-24 18:44:02 +08:00
parent 456d5eb382
commit 8b7be0ada0
6 changed files with 5448 additions and 39 deletions

View File

@ -7,67 +7,49 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{233774
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Games", "Games", "{DE1F8B53-6C02-3C13-9101-A7C8D96F3FF6}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Games", "Games", "{DE1F8B53-6C02-3C13-9101-A7C8D96F3FF6}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cut5", "Intermediate\ProjectFiles\Cut5.vcxproj", "{B95E7D0E-DB45-3765-9058-E00EBBC4B157}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE5", "Intermediate\ProjectFiles\UE5.vcxproj", "{6EE39883-7339-3FB6-AD82-931FB137D37F}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE5", "Intermediate\ProjectFiles\UE5.vcxproj", "{C48D0E9D-C862-3EA3-96A7-752EE9D06362}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cut5", "Intermediate\ProjectFiles\Cut5.vcxproj", "{AF5A253A-0F37-38CE-8998-45CA936C112B}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{1CCEC849-CC72-4C59-8C36-2F7C38706D4C}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{1CCEC849-CC72-4C59-8C36-2F7C38706D4C}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
..\..\Software\UE_5.2\Engine\Extras\VisualStudioDebugging\Unreal.natvis = ..\..\Software\UE_5.2\Engine\Extras\VisualStudioDebugging\Unreal.natvis D:\UE\UE_5.2\Engine\Extras\VisualStudioDebugging\Unreal.natvis = D:\UE\UE_5.2\Engine\Extras\VisualStudioDebugging\Unreal.natvis
EndProjectSection EndProjectSection
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugGame Editor|Android = DebugGame Editor|Android
DebugGame Editor|Win64 = DebugGame Editor|Win64 DebugGame Editor|Win64 = DebugGame Editor|Win64
DebugGame|Android = DebugGame|Android
DebugGame|Win64 = DebugGame|Win64 DebugGame|Win64 = DebugGame|Win64
Development Editor|Android = Development Editor|Android
Development Editor|Win64 = Development Editor|Win64 Development Editor|Win64 = Development Editor|Win64
Development|Android = Development|Android
Development|Win64 = Development|Win64 Development|Win64 = Development|Win64
Shipping|Android = Shipping|Android
Shipping|Win64 = Shipping|Win64 Shipping|Win64 = Shipping|Win64
EndGlobalSection EndGlobalSection
# UnrealVS Section # UnrealVS Section
GlobalSection(ddbf523f-7eb6-4887-bd51-85a714ff87eb) = preSolution GlobalSection(ddbf523f-7eb6-4887-bd51-85a714ff87eb) = preSolution
AvailablePlatforms=Win64;Android AvailablePlatforms=Win64
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame Editor|Android.ActiveCfg = Invalid|x64 {6EE39883-7339-3FB6-AD82-931FB137D37F}.DebugGame Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame Editor|Win64.ActiveCfg = DebugGame_Editor|x64 {6EE39883-7339-3FB6-AD82-931FB137D37F}.DebugGame|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame Editor|Win64.Build.0 = DebugGame_Editor|x64 {6EE39883-7339-3FB6-AD82-931FB137D37F}.Development Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame|Android.ActiveCfg = Android_DebugGame|Win64 {6EE39883-7339-3FB6-AD82-931FB137D37F}.Development|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame|Android.Build.0 = Android_DebugGame|Win64 {6EE39883-7339-3FB6-AD82-931FB137D37F}.Shipping|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame|Win64.ActiveCfg = DebugGame|x64 {AF5A253A-0F37-38CE-8998-45CA936C112B}.DebugGame Editor|Win64.ActiveCfg = DebugGame_Editor|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame|Win64.Build.0 = DebugGame|x64 {AF5A253A-0F37-38CE-8998-45CA936C112B}.DebugGame Editor|Win64.Build.0 = DebugGame_Editor|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development Editor|Android.ActiveCfg = Invalid|x64 {AF5A253A-0F37-38CE-8998-45CA936C112B}.DebugGame|Win64.ActiveCfg = DebugGame|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development Editor|Win64.ActiveCfg = Development_Editor|x64 {AF5A253A-0F37-38CE-8998-45CA936C112B}.DebugGame|Win64.Build.0 = DebugGame|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development Editor|Win64.Build.0 = Development_Editor|x64 {AF5A253A-0F37-38CE-8998-45CA936C112B}.Development Editor|Win64.ActiveCfg = Development_Editor|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development|Android.ActiveCfg = Android_Development|Win64 {AF5A253A-0F37-38CE-8998-45CA936C112B}.Development Editor|Win64.Build.0 = Development_Editor|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development|Android.Build.0 = Android_Development|Win64 {AF5A253A-0F37-38CE-8998-45CA936C112B}.Development|Win64.ActiveCfg = Development|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development|Win64.ActiveCfg = Development|x64 {AF5A253A-0F37-38CE-8998-45CA936C112B}.Development|Win64.Build.0 = Development|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development|Win64.Build.0 = Development|x64 {AF5A253A-0F37-38CE-8998-45CA936C112B}.Shipping|Win64.ActiveCfg = Shipping|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Shipping|Android.ActiveCfg = Android_Shipping|Win64 {AF5A253A-0F37-38CE-8998-45CA936C112B}.Shipping|Win64.Build.0 = Shipping|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Shipping|Android.Build.0 = Android_Shipping|Win64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Shipping|Win64.ActiveCfg = Shipping|x64
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Shipping|Win64.Build.0 = Shipping|x64
{C48D0E9D-C862-3EA3-96A7-752EE9D06362}.DebugGame Editor|Android.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{C48D0E9D-C862-3EA3-96A7-752EE9D06362}.DebugGame Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{C48D0E9D-C862-3EA3-96A7-752EE9D06362}.DebugGame|Android.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{C48D0E9D-C862-3EA3-96A7-752EE9D06362}.DebugGame|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{C48D0E9D-C862-3EA3-96A7-752EE9D06362}.Development Editor|Android.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{C48D0E9D-C862-3EA3-96A7-752EE9D06362}.Development Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{C48D0E9D-C862-3EA3-96A7-752EE9D06362}.Development|Android.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{C48D0E9D-C862-3EA3-96A7-752EE9D06362}.Development|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{C48D0E9D-C862-3EA3-96A7-752EE9D06362}.Shipping|Android.ActiveCfg = BuiltWithUnrealBuildTool|Win64
{C48D0E9D-C862-3EA3-96A7-752EE9D06362}.Shipping|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{C48D0E9D-C862-3EA3-96A7-752EE9D06362} = {233774A8-CC9D-3FA9-86D1-90573E92B704} {6EE39883-7339-3FB6-AD82-931FB137D37F} = {233774A8-CC9D-3FA9-86D1-90573E92B704}
{B95E7D0E-DB45-3765-9058-E00EBBC4B157} = {DE1F8B53-6C02-3C13-9101-A7C8D96F3FF6} {AF5A253A-0F37-38CE-8998-45CA936C112B} = {DE1F8B53-6C02-3C13-9101-A7C8D96F3FF6}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@ -35,6 +35,7 @@ public:
virtual void AddNewCard(FEffectCardProperty& CardProperty, FString GroupName) {}; virtual void AddNewCard(FEffectCardProperty& CardProperty, FString GroupName) {};
virtual void OpenTimeline(const FString& TimelineName, bool NeedSaveBefore = false) {}; virtual void OpenTimeline(const FString& TimelineName, bool NeedSaveBefore = false) {};
virtual void OpenProject(const FString& Project) {}; virtual void OpenProject(const FString& Project) {};
virtual void ExportProject(const FString& ExportPath) {};
virtual FString GetGroupName(TSharedPtr<class IWidgetInterface> WidgetInterface) { return FString(); }; virtual FString GetGroupName(TSharedPtr<class IWidgetInterface> WidgetInterface) { return FString(); };
virtual FTimelinePropertyData* GetResourcePropertyDataPtr(FGuid GUID) { return nullptr; }; virtual FTimelinePropertyData* GetResourcePropertyDataPtr(FGuid GUID) { return nullptr; };
}; };

View File

@ -4,6 +4,8 @@
#include "SCutMainWindow.h" #include "SCutMainWindow.h"
#include "DesktopPlatformModule.h"
#include "IDesktopPlatform.h"
#include "Curtain/SCurtainPanel.h" #include "Curtain/SCurtainPanel.h"
#include "SCustomInputPanel.h" #include "SCustomInputPanel.h"
#include "SCustomInputResource.h" #include "SCustomInputResource.h"
@ -14,11 +16,13 @@
#include "STrackBody.h" #include "STrackBody.h"
#include "STrackHead.h" #include "STrackHead.h"
#include "Cut5/Utils/Utils.h" #include "Cut5/Utils/Utils.h"
#include "Cut5/Xml/tinyxml2.h"
#include "FX/SEffectCardsPanel.h" #include "FX/SEffectCardsPanel.h"
#include "Widgets/Layout/SConstraintCanvas.h" #include "Widgets/Layout/SConstraintCanvas.h"
#include "Widgets/Layout/SScaleBox.h" #include "Widgets/Layout/SScaleBox.h"
#include "Widgets/Layout/SWidgetSwitcher.h" #include "Widgets/Layout/SWidgetSwitcher.h"
#include "Widgets/Views/STreeView.h" #include "Widgets/Views/STreeView.h"
#include "Windows/AllowWindowsPlatformTypes.h"
BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
@ -186,6 +190,11 @@ void SCutMainWindow::Construct(const FArguments& InArgs)
SoundThread = new FSoundThread(); SoundThread = new FSoundThread();
FRunnableThread* Thread = FRunnableThread::Create(SoundThread, TEXT("SoundThread")); FRunnableThread* Thread = FRunnableThread::Create(SoundThread, TEXT("SoundThread"));
OpenProject(FPaths::Combine(FPaths::ProjectSavedDir(), TEXT("DefaultProject"))); OpenProject(FPaths::Combine(FPaths::ProjectSavedDir(), TEXT("DefaultProject")));
FString String;
IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get();
DesktopPlatform->OpenDirectoryDialog(nullptr, TEXT("选择导出路径"), String, String);
ExportProject(String);
} }
void SCutMainWindow::Render() void SCutMainWindow::Render()
@ -331,6 +340,48 @@ void SCutMainWindow::OpenProject(const FString& Project)
CutTimeline->LoadTimeline(FPaths::Combine(Project, FGlobalData::CurrentProjectName + TEXT(".bin")), OpenedInfo); CutTimeline->LoadTimeline(FPaths::Combine(Project, FGlobalData::CurrentProjectName + TEXT(".bin")), OpenedInfo);
} }
void SCutMainWindow::ExportProject(const FString& ExportPath)
{
if (ExportPath.IsEmpty())
return;
tinyxml2::XMLDocument Document;
tinyxml2::XMLElement* RootElement = Document.NewElement(TCHAR_TO_UTF8(*FString::Printf(TEXT("Project(%s)"), *FGlobalData::CurrentProjectName)));
Document.InsertFirstChild(RootElement);
tinyxml2::XMLElement* Standard = RootElement->InsertNewChildElement("Standard");
tinyxml2::XMLElement* File = Standard->InsertNewChildElement("File");
File->InsertNewText("Author");
// Device List
tinyxml2::XMLElement* DeviceList = RootElement->InsertNewChildElement("DeviceList");
tinyxml2::XMLElement* PlayerLightList = DeviceList->InsertNewChildElement("PlayerLightList");
tinyxml2::XMLElement* DMLightList = DeviceList->InsertNewChildElement("DMLightList");
tinyxml2::XMLElement* LightArrayList = DeviceList->InsertNewChildElement("GuangZhenList");
tinyxml2::XMLElement* RoundSpeakerList = DeviceList->InsertNewChildElement("RotationSpeakerList");
tinyxml2::XMLElement* ProjectorList = DeviceList->InsertNewChildElement("ProjectorList");
int32 ID = 0;
for (int32 i = 0; i < CutTimeline->TrackGroups.Num(); i++)
{
for (FTrackData& TrackData : CutTimeline->TrackGroups[i].TrackDataArray)
{
switch (TrackData.TrackType)
{
case ETrackType::PlayerTrack:
tinyxml2::XMLElement* PlayerLight = PlayerLightList->InsertNewChildElement("PlayerLight");
PlayerLight->InsertNewChildElement("ID")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(ID)));
ID++;
break;
}
}
}
TArray<uint8> Data {0};
FFileHelper::SaveArrayToFile(Data, *(ExportPath + "/" + FGlobalData::CurrentProjectName + "/" + FGlobalData::CurrentProjectName + TEXT(".bin")));
Document.SaveFile(TCHAR_TO_UTF8(*(ExportPath + "/" + FGlobalData::CurrentProjectName + "/" + FGlobalData::CurrentProjectName + TEXT(".xml"))));
}
FTimelinePropertyData* SCutMainWindow::GetResourcePropertyDataPtr(FGuid GUID) FTimelinePropertyData* SCutMainWindow::GetResourcePropertyDataPtr(FGuid GUID)
{ {

View File

@ -55,6 +55,7 @@ public:
virtual void AddNewCard(FEffectCardProperty& CardProperty, FString GroupName) override; virtual void AddNewCard(FEffectCardProperty& CardProperty, FString GroupName) override;
virtual void OpenTimeline(const FString& TimelineName, bool NeedSaveBefore) override; virtual void OpenTimeline(const FString& TimelineName, bool NeedSaveBefore) override;
virtual void OpenProject(const FString& Project) override; virtual void OpenProject(const FString& Project) override;
virtual void ExportProject(const FString& ExportPath) override;
virtual FTimelinePropertyData* GetResourcePropertyDataPtr(FGuid GUID) override; virtual FTimelinePropertyData* GetResourcePropertyDataPtr(FGuid GUID) override;
virtual FString GetGroupName(TSharedPtr<IWidgetInterface> WidgetInterface) override; virtual FString GetGroupName(TSharedPtr<IWidgetInterface> WidgetInterface) override;

2994
Source/Cut5/Xml/tinyxml2.cpp Normal file

File diff suppressed because it is too large Load Diff

2380
Source/Cut5/Xml/tinyxml2.h Normal file

File diff suppressed because it is too large Load Diff