Skip to content

Instantly share code, notes, and snippets.

@amelkor
Created January 23, 2024 13:13
Show Gist options
  • Select an option

  • Save amelkor/868f6fce82dbd40f2c4286062306035f to your computer and use it in GitHub Desktop.

Select an option

Save amelkor/868f6fce82dbd40f2c4286062306035f to your computer and use it in GitHub Desktop.
Pushes down all NLA actions
import bpy
for action in bpy.data.actions:
# Create a new NLA track for each action
bpy.context.view_layer.objects.active.animation_data_create()
track = bpy.context.view_layer.objects.active.animation_data.nla_tracks.new()
track.name = action.name
strip = track.strips.new(action.name, int(action.frame_start), action)
print('NLA pushed ' + str(strip))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment