Refresh Editor UI

Hey guys!

I am writing a python script to save some time in setting up level sequences. For example adding assets like skeletal meshes with the proper animation from the content browser.

My questions is -> How do I refresh/update/redraw the Level Sequence editor after running the python script?

The only option right now is to reopen the Level Sequence.

If you could give me a hint or even the solution that would be great! :smiley:

Thank you in advance!
Have a nice day!

Cheers!

Not ideal, but this seems to work for the moment. You might already be doing this, but posting some code in case others run into this issue too.

Destroy the editor panel and re-open it in python for the given sequence asset.



asset_subsystem = unreal.get_editor_subsystem(unreal.AssetEditorSubsystem)
asset_subsystem.close_all_editors_for_asset(level_seq_asset)
asset_subsystem.open_editor_for_assets([level_seq_asset])


1 Like

unreal.LevelSequenceEditorBlueprintLibrary.refresh_current_level_sequence()

just dd the above code in ur script
this should work

1 Like