2
$\begingroup$

Is there a way to automatically rename all existing NLA tracks with the name of the action that they are holding? Tried to find some scripts but only found the one to create an NLA with the name of the active action, not to rename all the existing selected ones.enter image description here

$\endgroup$

1 Answer 1

4
$\begingroup$

Try this. It affects all selected objects.

import bpy
for ob in bpy.context.selected_objects:
    if ob.animation_data:
        for track in ob.animation_data.nla_tracks:
            if track.strips:
                track.name = track.strips[0].action.name

If you want to do only selected tracks, replace if track.strips: with if track.strips and track.select:.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .