| 97 | } |
| 98 | |
| 99 | int32 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 | |
| 129 | int32 FFlowTriggerSection::OnPaintSection(FSequencerSectionPainter& Painter) const |
| 130 | { |