Guest User

Untitled

a guest
Nov 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #Anim controls
  2.  
  3. bpy.ops.object.select_same_group(group="MyGroup")
  4. nla_strips = []
  5. for obj in bpy.context.selected_objects:
  6. if obj.animation_data is not None:
  7. action = obj.animation_data.action
  8. if action is not None:
  9. track = obj.animation_data.nla_tracks.new()
  10. track.strips.new(action.name, action.frame_range[1], action)
  11. obj.animation_data.action = None
  12.  
  13. if obj.animation_data and obj.animation_data.nla_tracks:
  14.  
  15. for track in obj.animation_data.nla_tracks:
  16.  
  17. for strip in track.strips:
  18. nla_strips.append((strip,))
  19. strip.frame_start = 60
Add Comment
Please, Sign In to add comment