nik684

Untitled

Jun 10th, 2024 (edited)
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. (
  2. fn TransferObjParams frame objA objB =
  3. (
  4. objA.transform = objB.transform
  5. if isValidNode objA.target AND isValidNode objB.target do
  6. (
  7. objA.target.pos = objB.target.pos
  8. )
  9. )
  10.  
  11. fn AnimateCamToObjects cam obj_arr start_frame:0 =
  12. (
  13. if not isValidNode cam do return "invalid node"
  14.  
  15. local cur_time = start_frame
  16. with animate on
  17. (
  18. for i=1 to obj_arr.count do
  19. (
  20. at time cur_time
  21. (
  22. TransferObjParams cur_time cam obj_arr[i]
  23. )
  24. cur_time += 1
  25. )
  26. )
  27. )
  28.  
  29. local cam = pickObject rubberBand:selection.center
  30. local sel_objs = getCurrentSelection()
  31.  
  32. AnimateCamToObjects cam sel_objs start_frame:0
  33. select cam
  34. )
Advertisement
Add Comment
Please, Sign In to add comment