# Python: how to get the master level sequence

**URL:** <https://forums.unrealengine.com/t/python-how-to-get-the-master-level-sequence/157714>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [February 11, 2021, 10:12am UTC](https://forums.unrealengine.com/t/python-how-to-get-the-master-level-sequence/157714 "2021-02-11T10:12:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shibuku87](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shibuku87](https://forums.unrealengine.com/u/Shibuku87)\
**Post date:** [February 11, 2021, 10:12am UTC](https://forums.unrealengine.com/t/python-how-to-get-the-master-level-sequence/157714/1 "2021-02-11T10:12:23Z")

</div>

Hello unreal community,

I recently started with unreal and now digging into the Python API. At the moment I am trying to find the master tracks inside my unreal project.  
I would be glad if somebody could give me a hint how to find the master level sequence tracks.

Thank you.  
Cheers

---

<div class="post-metadata">

**Author:** ![Max.Chen](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/max.chen/32/1194502_2.png) [@Max.Chen](https://forums.unrealengine.com/u/Max.Chen)\
**Post date:** [February 12, 2021, 1:11am UTC](https://forums.unrealengine.com/t/python-how-to-get-the-master-level-sequence/157714/2 "2021-02-12T01:11:03Z")

</div>

It should just be:

```auto

sequence.get_master_tracks()

```

Make sure to take a look at examples here in your build directory:

Engine\Plugins\MovieScene\SequencerScripting\Content\Python\sequencer\_examples.py

---

<div class="post-metadata">

**Author:** ![Shibuku87](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shibuku87](https://forums.unrealengine.com/u/Shibuku87)\
**Post date:** [February 12, 2021, 8:16am UTC](https://forums.unrealengine.com/t/python-how-to-get-the-master-level-sequence/157714/3 "2021-02-12T08:16:36Z")

</div>

Thank you Max,  
I already tried this one (for example on the MeerkatDemo). But I always receive:

> [@](#):
>
> LogLinker: Warning: Failed to load ‘/Game/Levels’: Can’t find file.  
> LogUObjectGlobals: Warning: Failed to find object ‘Object None./Game/Levels’

In the Levels folder there is one master sequence and another folder with shots (level sequences) which are referenced inside the master sequence.

---

<div class="post-metadata">

**Author:** ![Shibuku87](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shibuku87](https://forums.unrealengine.com/u/Shibuku87)\
**Post date:** [February 17, 2021, 11:12am UTC](https://forums.unrealengine.com/t/python-how-to-get-the-master-level-sequence/157714/4 "2021-02-17T11:12:20Z")

</div>

Finally found the right approach. Mixed up the sequencer example with some other things I found. If somebody is interested here is my approach for searching existing master sequences inside an existing unreal project.

> [@](#):
>
> ```auto
> 
> asset_helper = unreal.AssetRegistryHelpers.get_asset_registry()
> levels = asset_helper.get_assets_by_path('/Game', True)
> 
> sequences = ]
> 
> for level in levels:
> full_name = level.get_full_name()
> type, name = full_name.split(" ")
> if type == 'LevelSequence':
> if level.get_asset().find_master_tracks_by_type(unreal.MovieSceneCinematicShotTrack):
> sequences.append(name)
> 
> ```
