Announcement

Collapse
No announcement yet.

python api / How to rename sequence binding ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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:

    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~


    #2
    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.

    Code:
    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?

    Comment

    Working...
    X