步骤卡更新
This commit is contained in:
parent
69ba93ba53
commit
d0a7fac4dc
@ -18,6 +18,7 @@ public:
|
||||
TSharedPtr<FUICommandInfo> RightPerFrame;
|
||||
TSharedPtr<FUICommandInfo> PlayFrame;
|
||||
TSharedPtr<FUICommandInfo> Delete;
|
||||
TSharedPtr<FUICommandInfo> Save;
|
||||
|
||||
TSharedPtr<FUICommandInfo> TimelineMoveLeft;
|
||||
TSharedPtr<FUICommandInfo> TimelineMoveRight;
|
||||
|
@ -14,6 +14,7 @@ void FShortCutCommands::RegisterCommands()
|
||||
UI_COMMAND(RightPerFrame, "右移一帧", "Executes My FCurtainCommands", EUserInterfaceActionType::ToggleButton, FInputChord(EKeys::RightBracket));
|
||||
UI_COMMAND(TimelineMoveLeft, "左侧移动时间轴", "Executes My FCurtainCommands", EUserInterfaceActionType::ToggleButton, FInputChord(EKeys::MouseScrollDown, EModifierKey::Shift));
|
||||
UI_COMMAND(TimelineMoveRight, "右侧移动时间轴", "Executes My FCurtainCommands", EUserInterfaceActionType::ToggleButton, FInputChord(EKeys::MouseScrollUp, EModifierKey::Shift));
|
||||
UI_COMMAND(Save, "保存", "Executes My FCurtainCommands", EUserInterfaceActionType::ToggleButton, FInputChord(EKeys::S, EModifierKey::Control));
|
||||
|
||||
|
||||
UI_COMMAND(StartCollectGarbage, "启用垃圾回收", "Executes Start Garbage Collect", EUserInterfaceActionType::ToggleButton, FInputChord(EKeys::O, EModifierKey::Shift));
|
||||
|
@ -81,6 +81,7 @@ void SCurtain::Construct(const FArguments& InArgs)
|
||||
{
|
||||
FSlateApplication::Get().SetKeyboardFocus(InlineEditableTextBlock);
|
||||
}
|
||||
Curtain->Step = 1 + Offset + (Curtain - CurtainGroup->Curtains.GetData());
|
||||
}
|
||||
|
||||
FReply SCurtain::OnDragDetected(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent)
|
||||
|
@ -645,7 +645,7 @@ struct CUT5_API FEffectCardProperty
|
||||
bool bIsActive = false;
|
||||
int32 ID = 0;
|
||||
TArray<FStringWithGUID> UsedCurtains;
|
||||
TArray<FStringWithGUID> JumpStepCurtains;
|
||||
FStringWithGUID JumpStepCurtains;
|
||||
friend FArchive& operator<<(FArchive& Ar, FEffectCardProperty& EffectCardProperty)
|
||||
{
|
||||
Ar << EffectCardProperty.Guid;
|
||||
@ -670,7 +670,7 @@ struct CUT5_API FEffectCardGroup
|
||||
FTimelineInfo TimelineInfo;
|
||||
int32 ID = 0;
|
||||
TArray<FStringWithGUID> UsedCurtains;
|
||||
TArray<FStringWithGUID> JumpStepCurtains;
|
||||
FStringWithGUID JumpStepCurtains;
|
||||
friend FArchive& operator<<(FArchive& Ar, FEffectCardGroup& EffectCard)
|
||||
{
|
||||
Ar << EffectCard.GroupName;
|
||||
@ -694,7 +694,7 @@ public:
|
||||
FGuid CurtainUUID = FGuid::NewGuid();
|
||||
FTimelineInfo TimelineInfo;
|
||||
bool bIsActive = false;
|
||||
|
||||
int32 Step = 0;
|
||||
friend FArchive& operator<< (FArchive& Ar, FCurtain& Curtain)
|
||||
{
|
||||
Ar << Curtain.CurtainName;
|
||||
|
@ -216,7 +216,6 @@ TSharedPtr<SWidget> SEffectCard::GetPropertiesWidget()
|
||||
JumpStepNames.Empty();
|
||||
TArray<FCurtainGroup>& Groups = static_cast<SCutMainWindow*>(MainInterface)->CurtainPanel->Groups;
|
||||
GroupNames.Add(MakeShared<FStringWithGUID>(TEXT("全局"), FGuid()));
|
||||
JumpStepNames.Add(MakeShared<FStringWithGUID>(TEXT("全局"), FGuid()));
|
||||
for (FCurtainGroup& Group : Groups)
|
||||
{
|
||||
for (FCurtain& Curtain : Group.Curtains)
|
||||
@ -392,10 +391,12 @@ TSharedPtr<SWidget> SEffectCard::GetPropertiesWidget()
|
||||
if (State == ECheckBoxState::Checked)
|
||||
{
|
||||
CardProperty->UsedCurtains.Add(*InItem.Get());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
CardProperty->UsedCurtains.Remove(*InItem.Get());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -458,7 +459,7 @@ TSharedPtr<SWidget> SEffectCard::GetPropertiesWidget()
|
||||
.HeightOverride(32)
|
||||
[
|
||||
SAssignNew(GroupComboBox, SComboBox<TSharedPtr<FStringWithGUID>>)
|
||||
.OptionsSource(&GroupNames)
|
||||
.OptionsSource(&JumpStepNames)
|
||||
.OnGenerateWidget_Lambda([this](TSharedPtr<FStringWithGUID> InItem)
|
||||
{
|
||||
return SNew(SHorizontalBox)
|
||||
@ -470,16 +471,18 @@ TSharedPtr<SWidget> SEffectCard::GetPropertiesWidget()
|
||||
.HAlign(HAlign_Right)
|
||||
[
|
||||
SNew(SCheckBox)
|
||||
.IsChecked(CardProperty->JumpStepCurtains.Find(*InItem.Get()) != INDEX_NONE ? ECheckBoxState::Checked : ECheckBoxState::Unchecked)
|
||||
.IsChecked(CardProperty->JumpStepCurtains == *InItem.Get() ? ECheckBoxState::Checked : ECheckBoxState::Unchecked)
|
||||
.OnCheckStateChanged_Lambda([this, InItem](const ECheckBoxState& State)
|
||||
{
|
||||
if (State == ECheckBoxState::Checked)
|
||||
{
|
||||
CardProperty->JumpStepCurtains.Add(*InItem.Get());
|
||||
CardProperty->JumpStepCurtains = *InItem.Get();
|
||||
MainInterface->UpdateProperties(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
CardProperty->JumpStepCurtains.Remove(*InItem.Get());
|
||||
CardProperty->JumpStepCurtains = FStringWithGUID();
|
||||
MainInterface->UpdateProperties(this);
|
||||
}
|
||||
|
||||
|
||||
@ -490,13 +493,9 @@ TSharedPtr<SWidget> SEffectCard::GetPropertiesWidget()
|
||||
[
|
||||
SNew(STextBlock).Text_Lambda([this]()
|
||||
{
|
||||
if (CardProperty->JumpStepCurtains.Num() > 1)
|
||||
if (CardProperty->JumpStepCurtains.Guid.IsValid())
|
||||
{
|
||||
return FText::FromString(TEXT("多选"));
|
||||
}
|
||||
else if (CardProperty->JumpStepCurtains.Num() == 1)
|
||||
{
|
||||
return FText::FromString(CardProperty->JumpStepCurtains[0].String);
|
||||
return FText::FromString(CardProperty->JumpStepCurtains.String);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -36,7 +36,6 @@ void SEffectCardGroup::Construct(const FArguments& InArgs)
|
||||
JumpStepNames.Empty();
|
||||
TArray<FCurtainGroup>& Groups = static_cast<SCutMainWindow*>(MainInterface)->CurtainPanel->Groups;
|
||||
GroupNames.Add(MakeShared<FStringWithGUID>(TEXT("全局"), FGuid()));
|
||||
JumpStepNames.Add(MakeShared<FStringWithGUID>(TEXT("全局"), FGuid()));
|
||||
for (FCurtainGroup& Group : Groups)
|
||||
{
|
||||
for (FCurtain& Curtain : Group.Curtains)
|
||||
@ -253,7 +252,7 @@ void SEffectCardGroup::Construct(const FArguments& InArgs)
|
||||
.HeightOverride(32)
|
||||
[
|
||||
SAssignNew(GroupComboBox, SComboBox<TSharedPtr<FStringWithGUID>>)
|
||||
.OptionsSource(&GroupNames)
|
||||
.OptionsSource(&JumpStepNames)
|
||||
.OnGenerateWidget_Lambda([this](TSharedPtr<FStringWithGUID> InItem)
|
||||
{
|
||||
return SNew(SHorizontalBox)
|
||||
@ -271,10 +270,12 @@ void SEffectCardGroup::Construct(const FArguments& InArgs)
|
||||
if (State == ECheckBoxState::Checked)
|
||||
{
|
||||
EffectCardGroup->UsedCurtains.Add(*InItem.Get());
|
||||
MainInterface->UpdateProperties(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
EffectCardGroup->UsedCurtains.Remove(*InItem.Get());
|
||||
MainInterface->UpdateProperties(this);
|
||||
}
|
||||
|
||||
|
||||
@ -346,16 +347,16 @@ void SEffectCardGroup::Construct(const FArguments& InArgs)
|
||||
.HAlign(HAlign_Right)
|
||||
[
|
||||
SNew(SCheckBox)
|
||||
.IsChecked(EffectCardGroup->JumpStepCurtains.Find(*InItem.Get()) != INDEX_NONE ? ECheckBoxState::Checked : ECheckBoxState::Unchecked)
|
||||
.IsChecked(EffectCardGroup->JumpStepCurtains == *InItem.Get() ? ECheckBoxState::Checked : ECheckBoxState::Unchecked)
|
||||
.OnCheckStateChanged_Lambda([this, InItem](const ECheckBoxState& State)
|
||||
{
|
||||
if (State == ECheckBoxState::Checked)
|
||||
{
|
||||
EffectCardGroup->JumpStepCurtains.Add(*InItem.Get());
|
||||
EffectCardGroup->JumpStepCurtains = *InItem.Get();
|
||||
}
|
||||
else
|
||||
{
|
||||
EffectCardGroup->JumpStepCurtains.Remove(*InItem.Get());
|
||||
EffectCardGroup->JumpStepCurtains = FStringWithGUID();
|
||||
}
|
||||
|
||||
|
||||
@ -366,13 +367,9 @@ void SEffectCardGroup::Construct(const FArguments& InArgs)
|
||||
[
|
||||
SNew(STextBlock).Text_Lambda([this]()
|
||||
{
|
||||
if (EffectCardGroup->JumpStepCurtains.Num() > 1)
|
||||
if (EffectCardGroup->JumpStepCurtains.Guid.IsValid())
|
||||
{
|
||||
return FText::FromString(TEXT("多选"));
|
||||
}
|
||||
else if (EffectCardGroup->JumpStepCurtains.Num() == 1)
|
||||
{
|
||||
return FText::FromString(EffectCardGroup->JumpStepCurtains[0].String);
|
||||
return FText::FromString(EffectCardGroup->JumpStepCurtains.String);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -466,12 +466,16 @@ void SCutMainWindow::Construct(const FArguments& InArgs)
|
||||
if (CutTimeline->TrackBodyHScrollBox->GetScrollOffset() < CutTimeline->TrackBodyHScrollBox->GetScrollOffsetOfEnd())
|
||||
CutTimeline->TrackBodyHScrollBox->SetScrollOffset(CutTimeline->TrackBodyHScrollBox->GetScrollOffset() + 10);
|
||||
}));
|
||||
CommandList->MapAction(FShortCutCommands::Get().Save, FExecuteAction::CreateLambda([this]()
|
||||
{
|
||||
SaveProject();
|
||||
}));
|
||||
|
||||
CommandList->MapAction(FShortCutCommands::Get().StartCollectGarbage, FExecuteAction::CreateLambda([this]()
|
||||
{
|
||||
GEngine->SetTimeUntilNextGarbageCollection(1);
|
||||
GEngine->ForceGarbageCollection(true);
|
||||
}));
|
||||
CommandList->MapAction(FShortCutCommands::Get().StartCollectGarbage, FExecuteAction::CreateLambda([this]()
|
||||
{
|
||||
GEngine->SetTimeUntilNextGarbageCollection(1);
|
||||
GEngine->ForceGarbageCollection(true);
|
||||
}));
|
||||
|
||||
CommandList->MapAction(FShortCutCommands::Get().Copy, FExecuteAction::CreateLambda([this]()
|
||||
{
|
||||
@ -961,21 +965,33 @@ void SCutMainWindow::ExportProject(const FString& ExportPath)
|
||||
tinyxml2::XMLElement* RoundSpeakerList = DeviceList->InsertNewChildElement("RotationSpeakerList");
|
||||
tinyxml2::XMLElement* ProjectorList = DeviceList->InsertNewChildElement("ProjectorList");
|
||||
|
||||
int32 DeviceID = 0;
|
||||
int32 DeviceID = 1;
|
||||
|
||||
for (FDeviceTrackGroup& DeviceTrackGroup : CutTimeline->DeviceTrackGroups)
|
||||
{
|
||||
for (FDeviceTrack& TrackData : DeviceTrackGroup.DeviceTracks)
|
||||
{
|
||||
switch (TrackData.DeviceType)
|
||||
{
|
||||
case ETrackType::AtomSphereLightTrack:
|
||||
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.DeviceTrackGroup->GroupName));
|
||||
DeviceID++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (FDeviceTrackGroup& DeviceTrackGroup : CutTimeline->DeviceTrackGroups)
|
||||
{
|
||||
for (FDeviceTrack& TrackData : DeviceTrackGroup.DeviceTracks)
|
||||
{
|
||||
switch (TrackData.DeviceType)
|
||||
{
|
||||
case ETrackType::AudioTrackR:
|
||||
{
|
||||
tinyxml2::XMLElement* RotationSpeaker = RoundSpeakerList->InsertNewChildElement("RotationSpeaker");
|
||||
@ -1642,7 +1658,6 @@ tinyxml2::XMLElement* SCutMainWindow::GetSpecialEffectList(tinyxml2::XMLElement*
|
||||
const FString Name = FPaths::Combine(FGlobalData::BasePath, FGlobalData::CurrentProjectName, TEXT("FX"), EffectCardsPanel->EffectCardGroups[i].GroupName + TEXT(".bin"));
|
||||
OpenTimeline(Name, true, true);
|
||||
CurrentSelectedPropertiesInterfaceGuid = EffectCardsPanel->EffectCardGroups[i].Guid;
|
||||
// OnSelectCard(EffectCardsPanel->EffectCardGroups[i].Guid);
|
||||
}
|
||||
GetSpecialEffectGroup(SpecialEffectsList, &EffectCardsPanel->EffectCardGroups[i]);
|
||||
SpecialEffectID++;
|
||||
@ -1652,7 +1667,6 @@ tinyxml2::XMLElement* SCutMainWindow::GetSpecialEffectList(tinyxml2::XMLElement*
|
||||
{
|
||||
OpenTimeline(FUtils::SingleCardFullPath(EffectCardsPanel->EffectCardGroups[i].Cards[j].Guid.ToString()), true, true);
|
||||
CurrentSelectedPropertiesInterfaceGuid = EffectCardsPanel->EffectCardGroups[i].Cards[j].Guid;
|
||||
// OnSelectCard(EffectCardsPanel->EffectCardGroups[i].Cards[j].Guid);
|
||||
GetSpecialEffect(SpecialEffectsList, &EffectCardsPanel->EffectCardGroups[i].Cards[j]);
|
||||
SpecialEffectID++;
|
||||
}
|
||||
@ -1699,6 +1713,24 @@ tinyxml2::XMLElement* SCutMainWindow::GetSpecialEffect(tinyxml2::XMLElement* Par
|
||||
{
|
||||
ID->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(Effect->ID)));
|
||||
}
|
||||
|
||||
int32 CardType = 0;
|
||||
if (Effect->JumpStepCurtains.Guid.IsValid())
|
||||
{
|
||||
CardType = 1;
|
||||
}
|
||||
|
||||
Effectxml->InsertNewChildElement("Type")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(CardType)));
|
||||
Effectxml->InsertNewChildElement("Times")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(-1)));
|
||||
int32 Step = 0;
|
||||
|
||||
for (int32 i = 0; i < CurtainPanel->Groups.Num(); i++)
|
||||
{
|
||||
|
||||
}
|
||||
Effectxml->InsertNewChildElement("Step")->InsertNewText(TCHAR_TO_UTF8(*FString::FromInt(Step)));
|
||||
|
||||
|
||||
tinyxml2::XMLElement* AutoNext = Effectxml->InsertNewChildElement("AutoNext");
|
||||
GetSoundListElement(Effectxml);
|
||||
GetDeviceElement(Effectxml);
|
||||
|
@ -352,19 +352,19 @@ void SCutTimeline::Construct(const FArguments& InArgs)
|
||||
|
||||
FDeviceTrack AudioDataL(TEXT("音频L"), ETrackType::AudioTrack);
|
||||
AddNewDeviceToGroup(TEXT("固定轨道"), AudioDataL);
|
||||
FDeviceTrack AudioDataR(TEXT("音频R"), ETrackType::AudioTrackR);
|
||||
FDeviceTrack AudioDataR(TEXT("旋转一"), ETrackType::AudioTrackR);
|
||||
AddNewDeviceToGroup(TEXT("固定轨道"), AudioDataR);
|
||||
FDeviceTrack ProjectorData(TEXT("投影仪"), ETrackType::ProjectorTrack);
|
||||
FDeviceTrack ProjectorData(TEXT("投影一"), ETrackType::ProjectorTrack);
|
||||
AddNewDeviceToGroup(TEXT("固定轨道"), ProjectorData);
|
||||
FDeviceTrack VideoData(TEXT("视频"), ETrackType::VideoTrack);
|
||||
AddNewDeviceToGroup(TEXT("固定轨道"), VideoData);
|
||||
FDeviceTrack LightArrayData(TEXT("光阵"), ETrackType::LightArrayTrack);
|
||||
FDeviceTrack LightArrayData(TEXT("光阵一"), ETrackType::LightArrayTrack);
|
||||
AddNewDeviceToGroup(TEXT("固定轨道"), LightArrayData);
|
||||
FDeviceTrack LightBarData(TEXT("灯带"), ETrackType::LightBarTrack);
|
||||
AddNewDeviceToGroup(TEXT("固定轨道"), LightBarData);
|
||||
FDeviceTrack LightBarData2(TEXT("灯带2"), ETrackType::LightBarTrack);
|
||||
AddNewDeviceToGroup(TEXT("固定轨道"), LightBarData2);
|
||||
FDeviceTrack SpotLightData(TEXT("聚光灯"), ETrackType::SpotLightTrack);
|
||||
FDeviceTrack SpotLightData(TEXT("投射灯一"), ETrackType::SpotLightTrack);
|
||||
AddNewDeviceToGroup(TEXT("固定轨道"), SpotLightData);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user