Merge branch 'Test' of https://gitea.myredstone.top/Sch/Cut5 into 2023TestBranch
This commit is contained in:
commit
1c015f96e5
60
Cut5.sln
60
Cut5.sln
@ -7,49 +7,67 @@ 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}") = "UE5", "Intermediate\ProjectFiles\UE5.vcxproj", "{6EE39883-7339-3FB6-AD82-931FB137D37F}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cut5", "Intermediate\ProjectFiles\Cut5.vcxproj", "{B95E7D0E-DB45-3765-9058-E00EBBC4B157}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cut5", "Intermediate\ProjectFiles\Cut5.vcxproj", "{AF5A253A-0F37-38CE-8998-45CA936C112B}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE5", "Intermediate\ProjectFiles\UE5.vcxproj", "{C48D0E9D-C862-3EA3-96A7-752EE9D06362}"
|
||||||
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
|
||||||
D:\UE\UE_5.2\Engine\Extras\VisualStudioDebugging\Unreal.natvis = D:\UE\UE_5.2\Engine\Extras\VisualStudioDebugging\Unreal.natvis
|
..\..\Software\UE_5.2\Engine\Extras\VisualStudioDebugging\Unreal.natvis = ..\..\Software\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
|
AvailablePlatforms=Win64;Android
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{6EE39883-7339-3FB6-AD82-931FB137D37F}.DebugGame Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame Editor|Android.ActiveCfg = Invalid|x64
|
||||||
{6EE39883-7339-3FB6-AD82-931FB137D37F}.DebugGame|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame Editor|Win64.ActiveCfg = DebugGame_Editor|x64
|
||||||
{6EE39883-7339-3FB6-AD82-931FB137D37F}.Development Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame Editor|Win64.Build.0 = DebugGame_Editor|x64
|
||||||
{6EE39883-7339-3FB6-AD82-931FB137D37F}.Development|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame|Android.ActiveCfg = Android_DebugGame|Win64
|
||||||
{6EE39883-7339-3FB6-AD82-931FB137D37F}.Shipping|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame|Android.Build.0 = Android_DebugGame|Win64
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B}.DebugGame Editor|Win64.ActiveCfg = DebugGame_Editor|x64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame|Win64.ActiveCfg = DebugGame|x64
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B}.DebugGame Editor|Win64.Build.0 = DebugGame_Editor|x64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.DebugGame|Win64.Build.0 = DebugGame|x64
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B}.DebugGame|Win64.ActiveCfg = DebugGame|x64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development Editor|Android.ActiveCfg = Invalid|x64
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B}.DebugGame|Win64.Build.0 = DebugGame|x64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development Editor|Win64.ActiveCfg = Development_Editor|x64
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B}.Development Editor|Win64.ActiveCfg = Development_Editor|x64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development Editor|Win64.Build.0 = Development_Editor|x64
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B}.Development Editor|Win64.Build.0 = Development_Editor|x64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development|Android.ActiveCfg = Android_Development|Win64
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B}.Development|Win64.ActiveCfg = Development|x64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development|Android.Build.0 = Android_Development|Win64
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B}.Development|Win64.Build.0 = Development|x64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development|Win64.ActiveCfg = Development|x64
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B}.Shipping|Win64.ActiveCfg = Shipping|x64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Development|Win64.Build.0 = Development|x64
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B}.Shipping|Win64.Build.0 = Shipping|x64
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157}.Shipping|Android.ActiveCfg = Android_Shipping|Win64
|
||||||
|
{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
|
||||||
{6EE39883-7339-3FB6-AD82-931FB137D37F} = {233774A8-CC9D-3FA9-86D1-90573E92B704}
|
{C48D0E9D-C862-3EA3-96A7-752EE9D06362} = {233774A8-CC9D-3FA9-86D1-90573E92B704}
|
||||||
{AF5A253A-0F37-38CE-8998-45CA936C112B} = {DE1F8B53-6C02-3C13-9101-A7C8D96F3FF6}
|
{B95E7D0E-DB45-3765-9058-E00EBBC4B157} = {DE1F8B53-6C02-3C13-9101-A7C8D96F3FF6}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
@ -13,10 +13,22 @@
|
|||||||
#include "Serialization/BufferArchive.h"
|
#include "Serialization/BufferArchive.h"
|
||||||
|
|
||||||
|
|
||||||
|
// Use Relative Path
|
||||||
FString FFFMPEGUtils::LoadMedia(const FString& Path, FTimelinePropertyData* PropertyData)
|
FString FFFMPEGUtils::LoadMedia(const FString& Path, FTimelinePropertyData* PropertyData)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
FString NewPath;
|
||||||
|
if (FPaths::IsRelative(Path))
|
||||||
|
{
|
||||||
|
NewPath = FGlobalData::BasePath / FGlobalData::CurrentProjectName / Path;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NewPath = Path;
|
||||||
|
}
|
||||||
|
|
||||||
AVFormatContext* FormatContext = nullptr;
|
AVFormatContext* FormatContext = nullptr;
|
||||||
if (avformat_open_input(&FormatContext, TCHAR_TO_UTF8(*Path), nullptr, nullptr) != 0)
|
if (avformat_open_input(&FormatContext, TCHAR_TO_UTF8(*NewPath), nullptr, nullptr) != 0)
|
||||||
{
|
{
|
||||||
return TEXT("Failed");
|
return TEXT("Failed");
|
||||||
}
|
}
|
||||||
@ -185,7 +197,7 @@ FString FFFMPEGUtils::LoadMedia(const FString& Path, FTimelinePropertyData* Prop
|
|||||||
}
|
}
|
||||||
|
|
||||||
PropertyData->Name = FPaths::GetBaseFilename(Path);
|
PropertyData->Name = FPaths::GetBaseFilename(Path);
|
||||||
PropertyData->MoviePath = Path;
|
PropertyData->MoviePath = NewPath;
|
||||||
|
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
|
@ -788,6 +788,7 @@ struct CUT5_API FEffectCardProperty
|
|||||||
int32 ID = 0;
|
int32 ID = 0;
|
||||||
TArray<FStringWithGUID> UsedCurtains;
|
TArray<FStringWithGUID> UsedCurtains;
|
||||||
FStringWithGUID JumpStepCurtains;
|
FStringWithGUID JumpStepCurtains;
|
||||||
|
bool IsGlobal = true;
|
||||||
|
|
||||||
bool IsClone = false;
|
bool IsClone = false;
|
||||||
friend FArchive& operator<<(FArchive& Ar, FEffectCardProperty& EffectCardProperty)
|
friend FArchive& operator<<(FArchive& Ar, FEffectCardProperty& EffectCardProperty)
|
||||||
@ -799,6 +800,7 @@ struct CUT5_API FEffectCardProperty
|
|||||||
Ar << EffectCardProperty.UsedCurtains;
|
Ar << EffectCardProperty.UsedCurtains;
|
||||||
Ar << EffectCardProperty.JumpStepCurtains;
|
Ar << EffectCardProperty.JumpStepCurtains;
|
||||||
Ar << EffectCardProperty.IsClone;
|
Ar << EffectCardProperty.IsClone;
|
||||||
|
Ar << EffectCardProperty.IsGlobal;
|
||||||
return Ar;
|
return Ar;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -821,6 +823,8 @@ struct CUT5_API FEffectCardGroup
|
|||||||
int32 ID = 0;
|
int32 ID = 0;
|
||||||
TArray<FStringWithGUID> UsedCurtains;
|
TArray<FStringWithGUID> UsedCurtains;
|
||||||
FStringWithGUID JumpStepCurtains;
|
FStringWithGUID JumpStepCurtains;
|
||||||
|
bool IsGlobal = true;
|
||||||
|
|
||||||
friend FArchive& operator<<(FArchive& Ar, FEffectCardGroup& EffectCard)
|
friend FArchive& operator<<(FArchive& Ar, FEffectCardGroup& EffectCard)
|
||||||
{
|
{
|
||||||
Ar << EffectCard.GroupName;
|
Ar << EffectCard.GroupName;
|
||||||
@ -833,6 +837,7 @@ struct CUT5_API FEffectCardGroup
|
|||||||
Ar << EffectCard.ID;
|
Ar << EffectCard.ID;
|
||||||
Ar << EffectCard.UsedCurtains;
|
Ar << EffectCard.UsedCurtains;
|
||||||
Ar << EffectCard.JumpStepCurtains;
|
Ar << EffectCard.JumpStepCurtains;
|
||||||
|
Ar << EffectCard.IsGlobal;
|
||||||
return Ar;
|
return Ar;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -618,6 +618,49 @@ TSharedPtr<SWidget> SEffectCard::GetPropertiesWidget()
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
]
|
||||||
|
+ SVerticalBox::Slot()
|
||||||
|
.SizeParam(FAuto())
|
||||||
|
.Padding(0, 13, 0, 0)
|
||||||
|
[
|
||||||
|
SNew(SBox).HeightOverride(32).WidthOverride(214)
|
||||||
|
[
|
||||||
|
SNew(SHorizontalBox)
|
||||||
|
+ SHorizontalBox::Slot()
|
||||||
|
.SizeParam(FAuto())
|
||||||
|
.VAlign(VAlign_Center)
|
||||||
|
[
|
||||||
|
SNew(SBox)
|
||||||
|
.WidthOverride(62)
|
||||||
|
.HeightOverride(32)
|
||||||
|
.VAlign(VAlign_Center)
|
||||||
|
[
|
||||||
|
SNew(STextBlock)
|
||||||
|
.Text(FText::FromString(TEXT("全局")))
|
||||||
|
.Font(NormalText.Font)
|
||||||
|
.Justification(ETextJustify::Center)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
+ SHorizontalBox::Slot()
|
||||||
|
.SizeParam(FAuto())
|
||||||
|
.HAlign(HAlign_Right)
|
||||||
|
[
|
||||||
|
SNew(SBox)
|
||||||
|
.WidthOverride(136)
|
||||||
|
.HeightOverride(32)
|
||||||
|
[
|
||||||
|
SNew(SCheckBox)
|
||||||
|
.IsChecked_Lambda([this]()
|
||||||
|
{
|
||||||
|
return this->CardProperty->IsGlobal ? ECheckBoxState::Checked : ECheckBoxState::Unchecked;
|
||||||
|
})
|
||||||
|
.OnCheckStateChanged_Lambda([this](const ECheckBoxState State)
|
||||||
|
{
|
||||||
|
this->CardProperty->IsGlobal = State == ECheckBoxState::Checked;
|
||||||
|
})
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
return PropertiesWidget;
|
return PropertiesWidget;
|
||||||
|
@ -420,8 +420,52 @@ void SEffectCardGroup::Construct(const FArguments& InArgs)
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
]
|
||||||
|
+ SVerticalBox::Slot()
|
||||||
|
.SizeParam(FAuto())
|
||||||
|
.Padding(0, 13, 0, 0)
|
||||||
|
[
|
||||||
|
SNew(SBox).HeightOverride(32).WidthOverride(214)
|
||||||
|
[
|
||||||
|
SNew(SHorizontalBox)
|
||||||
|
+ SHorizontalBox::Slot()
|
||||||
|
.SizeParam(FAuto())
|
||||||
|
.VAlign(VAlign_Center)
|
||||||
|
[
|
||||||
|
SNew(SBox)
|
||||||
|
.WidthOverride(62)
|
||||||
|
.HeightOverride(32)
|
||||||
|
.VAlign(VAlign_Center)
|
||||||
|
[
|
||||||
|
SNew(STextBlock)
|
||||||
|
.Text(FText::FromString(TEXT("全局")))
|
||||||
|
.Font(NormalText.Font)
|
||||||
|
.Justification(ETextJustify::Center)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
+ SHorizontalBox::Slot()
|
||||||
|
.SizeParam(FAuto())
|
||||||
|
.HAlign(HAlign_Right)
|
||||||
|
[
|
||||||
|
SNew(SBox)
|
||||||
|
.WidthOverride(136)
|
||||||
|
.HeightOverride(32)
|
||||||
|
[
|
||||||
|
SNew(SCheckBox)
|
||||||
|
.IsChecked_Lambda([this]()
|
||||||
|
{
|
||||||
|
return this->EffectCardGroup->IsGlobal ? ECheckBoxState::Checked : ECheckBoxState::Unchecked;
|
||||||
|
})
|
||||||
|
.OnCheckStateChanged_Lambda([this](const ECheckBoxState State)
|
||||||
|
{
|
||||||
|
this->EffectCardGroup->IsGlobal = State == ECheckBoxState::Checked;
|
||||||
|
})
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
PropertiesInterfaceGUID = EffectCardGroup->Guid;
|
PropertiesInterfaceGUID = EffectCardGroup->Guid;
|
||||||
CallRender();
|
CallRender();
|
||||||
}
|
}
|
||||||
|
@ -254,12 +254,31 @@ void SCustomInputPanel::Construct(const FArguments& InArgs)
|
|||||||
DesktopPlatformModule->OpenFileDialog(nullptr, (TEXT("打开文件")), TEXT(""), TEXT(""), TEXT(""), EFileDialogFlags::Multiple, OpenFileName);
|
DesktopPlatformModule->OpenFileDialog(nullptr, (TEXT("打开文件")), TEXT(""), TEXT(""), TEXT(""), EFileDialogFlags::Multiple, OpenFileName);
|
||||||
for (int32 i = 0; i < OpenFileName.Num(); i++)
|
for (int32 i = 0; i < OpenFileName.Num(); i++)
|
||||||
{
|
{
|
||||||
|
AVFormatContext* Context = nullptr;
|
||||||
|
if (avformat_open_input(&Context, TCHAR_TO_UTF8(*OpenFileName[i]), nullptr, nullptr) != 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move Video To Save
|
||||||
|
FString MediaSavePath = FGlobalData::BasePath / FGlobalData::CurrentProjectName / TEXT("MediaFolder");
|
||||||
|
if (!FPaths::DirectoryExists(MediaSavePath))
|
||||||
|
{
|
||||||
|
FPlatformFileManager::Get().GetPlatformFile().CreateDirectoryTree(*MediaSavePath);
|
||||||
|
}
|
||||||
|
FString MediaBaseName = FPaths::GetBaseFilename(OpenFileName[i]) + TEXT(".") + FPaths::GetExtension(OpenFileName[i]);
|
||||||
|
MediaSavePath = MediaSavePath / MediaBaseName;
|
||||||
|
IFileManager::Get().Copy(*MediaSavePath, *OpenFileName[i], true, true);
|
||||||
|
|
||||||
|
FString RelativePath = TEXT("MediaFolder") / MediaBaseName;
|
||||||
|
|
||||||
FTimelinePropertyData Data;
|
FTimelinePropertyData Data;
|
||||||
if (FFFMPEGUtils::LoadMedia(OpenFileName[i], &Data) == TEXT("Failed"))
|
if (FFFMPEGUtils::LoadMedia(RelativePath, &Data) == TEXT("Failed"))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
TSharedPtr<SCustomInputResource> Resource = SNew(SCustomInputResource).MainInterface(MainWidgetInterface).CustomInputPanel(this)
|
TSharedPtr<SCustomInputResource> Resource = SNew(SCustomInputResource).MainInterface(MainWidgetInterface).CustomInputPanel(this)
|
||||||
.PropertyData(Data).OnCheckBoxChecked_Lambda([this](FTimelinePropertyData& ClickedData, bool bIsChecked)
|
.PropertyData(Data).OnCheckBoxChecked_Lambda([this](FTimelinePropertyData& ClickedData, bool bIsChecked)
|
||||||
{
|
{
|
||||||
|
@ -211,17 +211,38 @@ void SCutTimeline::Construct(const FArguments& InArgs)
|
|||||||
.MinValue(0.0)
|
.MinValue(0.0)
|
||||||
.Value_Lambda([this]()
|
.Value_Lambda([this]()
|
||||||
{
|
{
|
||||||
return FMath::GetMappedRangeValueClamped(FVector2D(30.0, GetCachedGeometry().GetLocalSize().X / FGlobalData::TrackLength), FVector2D(0, 1.0), FGlobalData::DefaultTimeTickSpace);
|
return FMath::GetMappedRangeValueClamped(FVector2D(GetCachedGeometry().GetLocalSize().X / FGlobalData::TrackLength, 15.0), FVector2D(0, 1.0), FGlobalData::DefaultTimeTickSpace);
|
||||||
})
|
})
|
||||||
.OnValueChanged_Lambda([this](float ChangedValue)
|
.OnValueChanged_Lambda([this](float ChangedValue)
|
||||||
{
|
{
|
||||||
FGlobalData::DefaultTimeTickSpace = FMath::GetMappedRangeValueClamped(FVector2D(0, 1.0), FVector2D(30.0, GetCachedGeometry().GetLocalSize().X / FGlobalData::TrackLength), ChangedValue);
|
FGlobalData::DefaultTimeTickSpace = FMath::GetMappedRangeValueClamped(FVector2D(0, 1.0), FVector2D(GetCachedGeometry().GetLocalSize().X / FGlobalData::TrackLength, 15.0), ChangedValue);
|
||||||
UpdateCursorPosition(GetCursorPosition(), false);
|
UpdateCursorPosition(GetCursorPosition(), false);
|
||||||
|
|
||||||
// TrackBodyHScrollBox->SetScrollOffset(TimelineTick->GetCursorPosition() * FGlobalData::DefaultTimeTickSpace);
|
|
||||||
|
|
||||||
TrackBodyHScrollBox->SetScrollOffset(0.0);
|
|
||||||
|
int32 Frame = GetCursorPosition();
|
||||||
|
|
||||||
|
float Offset = TrackBodyHScrollBox->GetScrollOffset();
|
||||||
|
float MaxOffset = TrackBodyHScrollBox->GetScrollOffsetOfEnd();
|
||||||
|
float TickOffset = TickScrollBox->GetScrollOffset();
|
||||||
|
float TickMaxOffset = TickScrollBox->GetScrollOffsetOfEnd();
|
||||||
|
|
||||||
|
// GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::White, FString::Printf(TEXT("Offset: %f, MaxOffset: %f, TickOffset: %f, TickMaxOffset: %f"), Offset, MaxOffset, TickOffset, TickMaxOffset));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
TrackBodyHScrollBox->SetScrollOffset(Frame * FGlobalData::DefaultTimeTickSpace);
|
||||||
|
if (TickScrollBox->GetScrollOffset() > TickScrollBox->GetScrollOffsetOfEnd())
|
||||||
|
{
|
||||||
|
TickScrollBox->SetScrollOffset(TickScrollBox->GetScrollOffsetOfEnd());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
TickScrollBox->SetScrollOffset(TrackBodyHScrollBox->GetScrollOffset());
|
TickScrollBox->SetScrollOffset(TrackBodyHScrollBox->GetScrollOffset());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
RenderGroup();
|
RenderGroup();
|
||||||
})
|
})
|
||||||
|
@ -54,6 +54,8 @@ int32 STimelineTick::OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGe
|
|||||||
int32 TickCount = //(FGlobalData::TrackLength * FGlobalData::CurrentTimeScroll) / FGlobalData::DefaultTimeTickSpace;
|
int32 TickCount = //(FGlobalData::TrackLength * FGlobalData::CurrentTimeScroll) / FGlobalData::DefaultTimeTickSpace;
|
||||||
FGlobalData::TrackLength;
|
FGlobalData::TrackLength;
|
||||||
|
|
||||||
|
int32 LastRenderedText = 0;
|
||||||
|
|
||||||
for (int32 j = 0; j < TickCount; j++)
|
for (int32 j = 0; j < TickCount; j++)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -73,8 +75,8 @@ int32 STimelineTick::OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGe
|
|||||||
|
|
||||||
|
|
||||||
const int32 Multiplier = FMath::GetMappedRangeValueClamped(FVector2D(500, 1), FVector2D(1, 6), Space);
|
const int32 Multiplier = FMath::GetMappedRangeValueClamped(FVector2D(500, 1), FVector2D(1, 6), Space);
|
||||||
|
int32 Result = int32(j * FGlobalData::DefaultTimeTickSpace);
|
||||||
if (j % (Multiplier * int32(FGlobalData::GlobalFPS)) == 0)
|
if (FMath::Abs(Result - 100 * (LastRenderedText)) < 14)
|
||||||
{
|
{
|
||||||
const FSlateBrush Brush;
|
const FSlateBrush Brush;
|
||||||
FSlateDrawElement::MakeBox(
|
FSlateDrawElement::MakeBox(
|
||||||
@ -88,8 +90,9 @@ int32 STimelineTick::OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGe
|
|||||||
, FSlateLayoutTransform(FVector2f(TickBox->GetCachedGeometry().GetLocalPositionAtCoordinates(FVector2f(0.0, 0.0)).X + j * FGlobalData::DefaultTimeTickSpace, 5)));
|
, FSlateLayoutTransform(FVector2f(TickBox->GetCachedGeometry().GetLocalPositionAtCoordinates(FVector2f(0.0, 0.0)).X + j * FGlobalData::DefaultTimeTickSpace, 5)));
|
||||||
FSlateDrawElement::MakeText(
|
FSlateDrawElement::MakeText(
|
||||||
OutDrawElements, LayerId, NewTextLoc, FGlobalData::GetTimeData(j), FAppStyle::Get().GetWidgetStyle<FTextBlockStyle>("NormalText").Font, ESlateDrawEffect::None, FLinearColor(1.0, 1.0, 1.0, 0.5));
|
OutDrawElements, LayerId, NewTextLoc, FGlobalData::GetTimeData(j), FAppStyle::Get().GetWidgetStyle<FTextBlockStyle>("NormalText").Font, ESlateDrawEffect::None, FLinearColor(1.0, 1.0, 1.0, 0.5));
|
||||||
|
LastRenderedText++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const FSlateBrush Brush;
|
const FSlateBrush Brush;
|
||||||
|
Loading…
Reference in New Issue
Block a user