MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / OnPaintSection

Method OnPaintSection

Source/FlowEditor/Private/MovieScene/FlowSection.cpp:99–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99int32 FFlowSection::OnPaintSection(FSequencerSectionPainter& Painter) const
100{
101 const int32 LayerId = Painter.PaintSectionBackground();
102 const UMovieSceneEventSection* EventSection = Cast<UMovieSceneEventSection>(WeakSection.Get());
103 if (!EventSection || !IsSectionSelected())
104 {
105 return LayerId;
106 }
107
108 const FTimeToPixel& TimeToPixelConverter = Painter.GetTimeConverter();
109
110 for (int32 KeyIndex = 0; KeyIndex < EventSection->GetEventData().GetKeyTimes().Num(); ++KeyIndex)
111 {
112 FFrameNumber EventTime = EventSection->GetEventData().GetKeyTimes()[KeyIndex];
113 FEventPayload EventData = EventSection->GetEventData().GetKeyValues()[KeyIndex];
114
115 if (EventSection->GetRange().Contains(EventTime))
116 {
117 FString EventString = EventData.EventName.ToString();
118 if (!EventString.IsEmpty())
119 {
120 const float PixelPos = TimeToPixelConverter.FrameToPixel(EventTime);
121 PaintEventName(Painter, LayerId, EventString, PixelPos);
122 }
123 }
124 }
125
126 return LayerId + 3;
127}
128
129int32 FFlowTriggerSection::OnPaintSection(FSequencerSectionPainter& Painter) const
130{

Callers

nothing calls this directly

Calls 4

FStringClass · 0.85
GetMethod · 0.80
ToStringMethod · 0.80
IsEmptyMethod · 0.80

Tested by

no test coverage detected