Setting AnimBP Actor references with Sequencer keys

Hi there,

I’m struggling a little bit with updating an Animation Blueprint variable of type Actor with a Sequencer track. The use case is I have an AnimBP with a custom “head look at” function so my characters can look at arbitrary objects (follow conversations, look at subjects et al).

There are two variables exposed to Sequencer, an enabled flag and a target. Then enabled flag gets set fine, yet the object reference to the target never seems to make it across to the BP. The value is always null when I inspect at runtime and the BP never passes a null safety check.

The image below shows the track, with what looks like the correct keys set to the correct target “SM_Rachel”.

Is there something else I need to do to get these Actor reference to pass along?

AM

Serializing raw AActor* is not supported in Sequencer because sequences live in their own assets and would need to reference an actor in another package.

You can try using a Soft Object Path (so a Soft Actor Reference in Blueprints) instead of just an Actor Reference for your variable type in your AnimBP.

Hi WiFitTrainr,

Thanks for posting back. I really appreciate that you’ve chipped in. It was an interesting idea for the Soft Actor Reference, but on a first pass it doesn’t look like that type can be “Exposed to Cinematics” :frowning:

I’m also a bit unsure about serialization support. You seem to have much more deep understanding of this than I, but my sequences contain heaps of working AActor references. There are at least 2 in the image above.

It seems somebody has thought about this because the Type AActor* HAS been cleared as safe to “Expose to Cinematics” so by inference it should be setable otherwise why allow the expose?

Also worth noting that I couldn’t Sequencer UI wouldn’t let me set the reference in the track until I had added the Actor to the sequence itself. Which makes sense, the asset would want to have some sort of implied understanding of what’s in scope.

Kinda wondering if I should log a bug report for this and see where it goes?

[edit for clarity]
…until I had added the Target Actor to the sequence itself.

but my sequences contain heaps of
working AActor references. There are
at least 2 in the image above.

Also worth noting that I couldn’t
Sequencer UI wouldn’t let me set the
reference in the track until I had
added the Actor to the sequence
itself.

These two end up being related - when you drag an actor into a Sequence and you see it in the tree/track area, Sequencer has created an “Object Binding” for that actor. The Object Binding, internally, stores a soft path to the actor in the world, but all other sequencer interactions that interact with it are referring to the Object Binding itself, and not the actor itself/a soft reference to the actor itself. So they’re not actually raw AActor*, instead they’re references to Object Bindings (which are kept track by just FGuid), and the Object Bindings store a soft reference.

Actor references do look like they’re able to be marked as Expose to Cinematics and they can be keyed, though ti does look like it can only be assigned to something else already in the Sequence.

Maybe you can add all the potential look targets into your Sequence (and just delete the Transform track off of them, and stuff 'em in a folder) and try that?


Maybe you can add all the potential look targets into your Sequence (and just delete the Transform track off of them, and stuff 'em in a folder) and try that?

That’s exactly what I’ve done. Added the potential targets to the sequence. Then added keys setting the actor. Everything looks like it should line up, but in the BluePrint the value is always null :frowning:
Are you seeing different behavior? If so I’ll tear what I’ve built down and try it again.

I am able to get this to work in the latest Dev-Editor at least, though I did not check the current release;

In the Animation Blueprint you can see that I’ve made a Soft Object reference of type Actor (note that it is light blue instead of the regular dark blue). Note that the Event Graph just prints out the display name of the actor every frame.

Here in Sequencer you can see that I’ve added my Skeletal Mesh, the instance of the Animation Blueprint component, and the variable to the AnimBP. I’ve set keys to two other objects in the sequence.

296528-ue4editor-3dvynrnffo.png

Finally here is the value in-game when I enable auto-play on my sequence and hit Play. Note that this won’t print out as you scrub in the editor as the Event Blueprint Update Animation isn’t fired for the instance in the level until PIE starts.

Ok, when I updated my existing test sequences to use the soft actor references it still didn’t work . When I rebuilt the characters, BP’s and sequences it does exactly what you say. Thanks so much for all your assistance. I’m a happy camper :slight_smile:

Now onto actually making content.