上传预设视频
This commit is contained in:
parent
4497c2b6c4
commit
aeecc56e6f
BIN
Resources/Presets/PresetVideo/心跳-宏.mp4
Normal file
BIN
Resources/Presets/PresetVideo/心跳-宏.mp4
Normal file
Binary file not shown.
BIN
Resources/Presets/PresetVideo/跑马灯-橘.mp4
Normal file
BIN
Resources/Presets/PresetVideo/跑马灯-橘.mp4
Normal file
Binary file not shown.
BIN
Resources/Presets/PresetVideo/跑马灯-玫红.mp4
Normal file
BIN
Resources/Presets/PresetVideo/跑马灯-玫红.mp4
Normal file
Binary file not shown.
BIN
Resources/Presets/PresetVideo/闪烁彩云.mp4
Normal file
BIN
Resources/Presets/PresetVideo/闪烁彩云.mp4
Normal file
Binary file not shown.
BIN
Resources/Presets/PresetVideo/闪电-绿.mp4
Normal file
BIN
Resources/Presets/PresetVideo/闪电-绿.mp4
Normal file
Binary file not shown.
BIN
Resources/Presets/PresetVideo/闪电.mp4
Normal file
BIN
Resources/Presets/PresetVideo/闪电.mp4
Normal file
Binary file not shown.
BIN
Resources/Presets/PresetVideo/随机闪电.mp4
Normal file
BIN
Resources/Presets/PresetVideo/随机闪电.mp4
Normal file
Binary file not shown.
BIN
Resources/Presets/PresetVideo/雷-红.mp4
Normal file
BIN
Resources/Presets/PresetVideo/雷-红.mp4
Normal file
Binary file not shown.
BIN
Resources/Presets/PresetVideo/雷-蓝.mp4
Normal file
BIN
Resources/Presets/PresetVideo/雷-蓝.mp4
Normal file
Binary file not shown.
@ -529,11 +529,11 @@ void DragDropOperator::OnDrop(const FGeometry& MyGeometry, const FDragDropEvent&
|
||||
}
|
||||
|
||||
if (TrackHead->TrackData.TrackType == ETrackType::AudioTrack ||
|
||||
TrackHead->TrackData.TrackType == ETrackType::AudioTrackR ||
|
||||
TrackHead->TrackData.TrackType == ETrackType::VideoTrack)
|
||||
TrackHead->TrackData.TrackType == ETrackType::AudioTrackR)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -579,6 +579,18 @@ void DragDropOperator::OnDrop(const FGeometry& MyGeometry, const FDragDropEvent&
|
||||
NewClipData.ClipEndFrame = NewClipData.ClipStartFrame + 15;
|
||||
}
|
||||
|
||||
if (PresetDragOperation->PresetData.PresetType == EPresetType::Video)
|
||||
{
|
||||
NewClipData.ClipType = ETrackType::VideoTrack;
|
||||
if (FUtils::DetectDragTypeCanDrop(NewClipData, TrackHead->TrackData.TrackType)
|
||||
{
|
||||
TrackHead->TrackData.ClipData.Add(NewClipData);
|
||||
TrackBody->CallRender();
|
||||
}
|
||||
return ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
TrackHead->TrackData.ClipData.Add(NewClipData);
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "SEffectPreset.h"
|
||||
|
||||
#include "SlateOptMacros.h"
|
||||
#include "Cut5/Utils/FFMPEGUtils.h"
|
||||
#include "Cut5/Utils/Utils.h"
|
||||
#include "Cut5/Widgets/MicroWidgets/SNewProjectTips.h"
|
||||
#include "Cut5/Widgets/Style/CutButtonWidgetStyle.h"
|
||||
@ -26,13 +27,23 @@ void SEffectPreset::Construct(const FArguments& InArgs)
|
||||
|
||||
if (!PresetPath.IsEmpty())
|
||||
{
|
||||
TArray<uint8> Data;
|
||||
FString LoadPath = FUtils::GetResourcesPath(TEXT("Presets/") + PresetPath, true);
|
||||
// GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Cyan, LoadPath);
|
||||
FFileHelper::LoadFileToArray(Data, *LoadPath);
|
||||
if (PresetType == EPresetType::Video)
|
||||
{
|
||||
FString LoadPath = FUtils::GetResourcesPath(TEXT("Presets/PresetVideo/") + PresetPath, true);
|
||||
FFFMPEGUtils::LoadMedia(LoadPath, &NewPropertyData);
|
||||
PresetsData.PresetType = EPresetType::Video;
|
||||
}
|
||||
else
|
||||
{
|
||||
TArray<uint8> Data;
|
||||
FString LoadPath = FUtils::GetResourcesPath(TEXT("Presets/") + PresetPath, true);
|
||||
// GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Cyan, LoadPath);
|
||||
FFileHelper::LoadFileToArray(Data, *LoadPath);
|
||||
|
||||
FMemoryReader MemoryReader(Data);
|
||||
MemoryReader << PresetsData;
|
||||
}
|
||||
|
||||
FMemoryReader MemoryReader(Data);
|
||||
MemoryReader << PresetsData;
|
||||
}
|
||||
|
||||
PresetsData.PresetType = PresetType;
|
||||
|
@ -30,6 +30,7 @@ public:
|
||||
FString PresetPath;
|
||||
FPresetsData PresetsData;
|
||||
ICutMainWidgetInterface* MainInterface;
|
||||
FTimelinePropertyData NewPropertyData;
|
||||
EPresetType PresetType;
|
||||
TSharedPtr<SComboBox<TSharedPtr<FString>>> GroupComboBox;
|
||||
virtual TSharedPtr<SWidget> GetPropertiesWidget() override;
|
||||
|
@ -368,15 +368,15 @@ void SCustomInputPanel::Construct(const FArguments& InArgs)
|
||||
AddPreset(TEXT("青柠"), TEXT("青柠.dat"), EPresetType::Color);
|
||||
AddPreset(TEXT("红-暗"), TEXT("红-暗.dat"), EPresetType::Gradient);
|
||||
AddPreset(TEXT("闪电"), TEXT("闪电.dat"), EPresetType::Video);
|
||||
AddPreset(TEXT("跑马灯-玫红"), TEXT(""));
|
||||
AddPreset(TEXT("心跳-宏"), TEXT(""));
|
||||
AddPreset(TEXT("5次闪电"), TEXT(""));
|
||||
AddPreset(TEXT("闪电-绿"), TEXT(""));
|
||||
AddPreset(TEXT("雷-红"), TEXT(""));
|
||||
AddPreset(TEXT("雷-蓝"), TEXT(""));
|
||||
AddPreset(TEXT("闪烁彩云"), TEXT(""));
|
||||
AddPreset(TEXT("跑马灯-橘"), TEXT(""));
|
||||
AddPreset(TEXT("随机闪电"), TEXT(""));
|
||||
AddPreset(TEXT("跑马灯-玫红"), TEXT("跑马灯-玫红.mp4"), EPresetType::Video);
|
||||
AddPreset(TEXT("心跳-宏"), TEXT(""), EPresetType::Video);
|
||||
AddPreset(TEXT("5次闪电"), TEXT(""), EPresetType::Video);
|
||||
AddPreset(TEXT("闪电-绿"), TEXT(""), EPresetType::Video);
|
||||
AddPreset(TEXT("雷-红"), TEXT(""), EPresetType::Video);
|
||||
AddPreset(TEXT("雷-蓝"), TEXT(""), EPresetType::Video);
|
||||
AddPreset(TEXT("闪烁彩云"), TEXT(""), EPresetType::Video);
|
||||
AddPreset(TEXT("跑马灯-橘"), TEXT(""), EPresetType::Video);
|
||||
AddPreset(TEXT("随机闪电"), TEXT(""), EPresetType::Video);
|
||||
AddPreset(TEXT("启动投影"), TEXT(""), EPresetType::EnableProjector);
|
||||
AddPreset(TEXT("屏蔽投影"), TEXT(""), EPresetType::DisableProjector);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user