You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Copying //Tasks/UE5/Dev-SequencerMVVM2 to Main (//UE5/Main) @20364093 #preflight 628866dfb94f739b152c1e29 #preflight 628866e4585e8f793ee80943 #rb ludovic.chabant, andrew.rodham #fyi ludovic.chabant, andrew.rodham, andrew.porter #jira UE-105322 [CL 20364493 by Max Chen in ue5-main branch]
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SequencerSectionPainter.h"
|
|
#include "MovieSceneSection.h"
|
|
#include "MovieSceneTrack.h"
|
|
#include "MVVM/ViewModels/SectionModel.h"
|
|
|
|
FSequencerSectionPainter::FSequencerSectionPainter(FSlateWindowElementList& OutDrawElements, const FGeometry& InSectionGeometry, TSharedPtr<UE::Sequencer::FSectionModel> InSection)
|
|
: Section(*InSection->GetSection())
|
|
, SectionModel(InSection)
|
|
, DrawElements(OutDrawElements)
|
|
, SectionGeometry(InSectionGeometry)
|
|
, LayerId(0)
|
|
, bParentEnabled(true)
|
|
, bIsHighlighted(false)
|
|
, bIsSelected(false)
|
|
, GhostAlpha(1.f)
|
|
{
|
|
}
|
|
|
|
FSequencerSectionPainter::~FSequencerSectionPainter()
|
|
{
|
|
}
|
|
|
|
int32 FSequencerSectionPainter::PaintSectionBackground()
|
|
{
|
|
return PaintSectionBackground(GetTrack()->GetColorTint());
|
|
}
|
|
|
|
UMovieSceneTrack* FSequencerSectionPainter::GetTrack() const
|
|
{
|
|
return SectionModel->GetSection()->GetTypedOuter<UMovieSceneTrack>();
|
|
}
|
|
|
|
FLinearColor FSequencerSectionPainter::BlendColor(FLinearColor InColor)
|
|
{
|
|
static FLinearColor BaseColor(FColor(71,71,71));
|
|
|
|
const float Alpha = InColor.A;
|
|
InColor.A = 1.f;
|
|
|
|
return BaseColor * (1.f - Alpha) + InColor * Alpha;
|
|
}
|