Description

In sequencer, an "event track" can be added to call functions/events defined in the Sequence Director Blueprint. The parameters for those endpoint functions/events can be sent as a Payload associated with each key on the track. However, if any parameters are of type "Soft Class Reference" or "Soft Object Reference", and the referenced class/object is not loaded when the Level Sequence asset itself is loaded/compiled, then those endpoint functions/events receive "None" instead of the correct path.

Additionally, if any parameters are of type "Soft Class Path", "Soft Object Path" or even "String", and the payload arguments represent a class/object path, then the endpoint functions/events always receive an empty string, even if the corresponding class/object was loaded when the Level Sequence asset was loaded/compiled.

The incorrect behavior with soft references is probably related to the code in file [Source\Editor\MovieSceneTools\Private\MovieSceneDirectorBlueprintUtils.cpp], function FMovieSceneDirectorBlueprintUtils::GenerateEntryPoint(), lines 312-319. Payload variables are internally stored as soft references to their actual object values, and at that point those soft references are resolved. But if the object value is already a soft reference, ResolveObject() attempts to resolve it and fails when the object is not loaded. Then, in file [Source\Editor\BlueprintGraph\Private\EdGraphSchema_K2.cpp], function UEdGraphSchema_K2::TrySetDefaultObject() just takes the path of the object (lines 4962-4966), but it was already null at this point.

The incorrect behavior with strings that represent class/object paths is probably also related to the code in file [Source\Editor\MovieSceneTools\Private\MovieSceneDirectorBlueprintEndpointCustomization.cpp], function FMovieSceneDirectorBlueprintEndpointCustomization::OnPayloadVariableChanged(), line 407. This associates an object with any payload variable that represent a path to an object. So the code in GenerateEntryPoint() will treat it as an object instead of a string.

 

Steps to Reproduce

=== ISSUE 1 ===

  • Create a blueprint of type "Actor" named "BP_Test"
  • Create a Level Sequence named "LS_Test"
  • Add a trigger event track
  • Add a key at frame 30
  • Double-click the key to create a custom event in the Sequence Director Blueprint
  • Implement the custom event:
  • Input: name "MyRef", type "Object – Soft Class Reference" or "Object – Soft Object Reference"
  • Code: convert input to a string and print it between quotes using PrintString()
  • On the key of the trigger event track:
  • Right click – Properties – Payload – set "MyRef" to "BP_Test"
  • Create a Basic Level named "Map_Test"
  • Drag "LS_Test" to the level to create a Level Sequence Actor
  • In the details panel for the actor, check "Playback – PlaybackSettings – Auto Play"
  • Compile and save everything
  • Quit and reopen the Editor
  • DO NOT open "BP_Test" yet
  • Open map "Map_Test"
  • PIE: The sequence will play and an incorrect empty string will be printed
  • Open and close "BP_Test"
  • Recompile "LS_Test"
  • PIE: The sequence will play and the correct "BP_Test" path will be printed

=== ISSUE 2 ===

  • Choose a type that can represent an object or class path. Examples: "String", "Soft Class Path", "Soft Object Path"
  • Repeat the test above changing using that type on the input of the sequence event
  • In PIE, the sequence will play and an incorrect empty string will be printed, even if the corresponding object/class was previously loaded!!

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-220745 in the post.

1
Login to Vote

Fixed
ComponentUE - Anim - Sequencer
Affects Versions5.4.3
Target Fix5.5
Fix Commit35487196
CreatedJul 31, 2024
ResolvedAug 13, 2024
UpdatedSep 3, 2024
View Jira Issue