Adding/removing actor tag to several selected actors - how (Python script) ?

I would like to add Actor tag to several selected (in the scene) actors (and if such tag already exists, skip it). I would also like to remove specified tag from selected actors.

How can I do this using Python script?

This works for me

    EAS = unreal.EditorActorSubsystem()

    sa = EAS.get_selected_level_actors()

    for a in sa:
        a.tags.append('niceOne')
        a.tags = list(set(a.tags)) # dicard any duplicate tags using a set
1 Like

Thanks a bunch, it works!

What about removing specific tag ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.