Download

Python equivalent to unreal.EditorAssetLibrary.get_all_level_actors() for sequencer?

Hi,

I’m looking for python code, equivalent to unreal.EditorAssetLibrary.get_all_level_actors() to get all sequencer items (camera, fbx objects etc) and then python code to get the available tracks on each. Basically I need to run a check to see if items exist, and if they do, to update tracks rather then recreate them.

Thanks,

Adnan Hussain

Take a look here in your source for some examples of manipulating sequencer data, in particular sequencer_examples.py:

Engine\Plugins\MovieScene\SequencerScripting\Content\Python

Thanks Max, this certainly gives me some good material to work through. From it, I found sequence.get_bindings() and sequence.get_master_tracks(), but I find the output confusing. I see master cuts track and some kind of transform track, or just the level itself, but I do not see the named tracks (camera, and an fbx) that I have created in the sequencer. How do I get those names?

You should be able to do something like this to get the display name for the objects:



for binding in sequence.get_bindings():
    binding.get_display_name()
    binding.get_tracks()


The non object tracks are going to be master tracks (ie. camera cut track, shot track, audio track, etc). For the names of those you can do:



for master_track in sequence.get_master_tracks():
    master_track.get_display_name()


Once you have the tracks, you have to iterate through the sections and the channels and the keys, if you want to get at the actual value/key data.

1 Like