Download

Is there any way to add a component from a binding using python in sequencer?

I have a spawnables binding in sequencer, and I want to add a component track to it.
However, I cannot get an Actor from the binding.

When I spawn to the level, I can get the component, but from the binding, I seem to be getting something else that is not an Actor.

actor = unreal.EditorLevelLibrary.spawn_actor_from_object(charaActorPath, pos, rot)
components = actor.get_component_by_class(unreal.SkeletalMeshComponent)

components return SkeletalMeshComponentList

template = binding.get_object_template()
components = template.get_component_by_class(unreal.SkeletalMeshComponent)

components return None

Is it possible to get an Actor or component from the sequencer?

I know there are some samples there on your UE installation Engine\Plugins\MovieScene\SequencerScripting\Content\Python, that can give you some ideas on how to manipulate sequence, bindings and tracks.

Thank you for your reply.

I know of some nice samples out there.
However, it doesn’t seem to have the code I want.

From the sample I am able to get the binding and track, but I am having trouble getting the actor or component from that data.

At the point when I add an Actor to a sequencer I have stored the Actor, so I can get the component from there.
If I then want to add a component to another sequencer, I can’t get the actor from the sequencer because I don’t have the actor stored.

Am I missing something in the code?