In Python, can't select an object if its hidden??!

I’m trying to create a tool for level sequences that will allow animators to save selections and access them again later, to prevent countless hours of scrolling through the level sequencer.

I’ve just discovered that apparently Unreal will not allow Python to select an object if it’s hidden. Is there a way around this?

To reproduce this issue:

  1. Drag a cube into your level editor. Hide it.

  2. Run this Python command to store your selection:
    Objects = unreal.EditorLevelLibrary.get_selected_level_actors( )

  3. Select something else.

  4. Run this Python command to retrieve your old selection:
    unreal.EditorLevelLibrary.set_selected_level_actors( Objects )

  5. Note that it did not work and that in the output log you’ll get a warning saying the selection failed.

  6. Curse and swear.

Is there a workaround for this? I tried the command unreal.EditorLevelLibrary.set_actor_selection_state and got the same result.

1 Like

encountered the exact same problem. Did you ever find a solution?