Python api / How to rename sequence binding?

Hello~

I`m trying to add a spawnable camera to sequence with python API.

I can add a spawnable camera with following code, and I can get name of binding.

But I don’t know how to rename this,

Here is my code:



spawnable_camera_binding = sequence.add_spawnable_from_class(unreal.CineCameraActor)
name = spawnable_camera_binding.get_display_name()


or If you know how to convert camera from possessable to spawnable with python api.

Please help me, I will appriciate any help.

Thanks in advance.

Cheers~

The only way I’ve found so far is to first create an actor, rename it, then use the add_spawnable_from_instance instead of add_spawnable_from_class. Then you can destroy the instance.



camera_name = "New_Camera"
camera_actor = unreal.EditorLevelLibrary().spawn_actor_from_class(unreal.CineCameraActor, unreal.Vector(0, 0, 0), unreal.Rotator(0, 0, 0))
camera_actor.set_actor_label(camera_name)
camera_track = sequence.add_spawnable_from_instance(camera_actor)
unreal.EditorLevelLibrary().destroy_actor(camera_actor)


But it seems odd to me that you can’t just rename an spawnable binding. Did you find any way to do it?

Not what you asked for exactly but here’s how to get the camera actor reference back from a spawnable_from_class

        camera_binding = sequence.add_spawnable_from_class(ue.CineCameraActor)
        camera_actor = camera_binding.get_object_template()
1 Like