Download

Add Enum track to level sequence by python

Hi, I’ve been working on add a series of custom anim blueprint variables to sequence to control my character by python(so I don’t have to add them everytime after creating another new sequence)
I’ve been able to add bool value and float value to sequence, but not okay with enum value. And engine crash everytime when I try to do this. Below is my function of adding parameter to sequence.

def add_face_parameter(abp_binding, current_sequencer, track_type, name, path):
    sequence_start = current_sequencer.get_playback_start()
    sequence_end = current_sequencer.get_playback_end()

    new_parameter_track = abp_binding.add_track(track_type)
    new_parameter_track.set_property_name_and_path(name, path)
    new_parameter_section = new_parameter_track.add_section()
    new_parameter_section.set_start_frame(sequence_start)
    new_parameter_section.set_end_frame(sequence_end)

Thanks!