getAnimationKeyframe.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. return {
  2. summary = 'Get a keyframe in a channel of an animation.',
  3. description = 'Returns a single keyframe in a channel of an animation.',
  4. arguments = {
  5. animation = {
  6. type = 'number',
  7. description = 'The name or index of an animation.'
  8. },
  9. channel = {
  10. type = 'number',
  11. description = 'The index of a channel in the animation.'
  12. },
  13. keyframe = {
  14. type = 'number',
  15. description = 'The index of a keyframe in the channel.'
  16. }
  17. },
  18. returns = {
  19. time = {
  20. type = 'number',
  21. description = 'The timestamp of the keyframe.'
  22. },
  23. ['...'] = {
  24. type = 'number',
  25. description = 'The data for the keyframe (3 or more numbers, depending on the property).'
  26. }
  27. },
  28. variants = {
  29. {
  30. arguments = { 'animation', 'channel', 'keyframe' },
  31. returns = { 'time', '...' }
  32. }
  33. },
  34. notes = [[
  35. The number of values returned after `time` depends on the `AnimationProperty` targeted by the
  36. channel:
  37. - `translation`: 3 numbers
  38. - `rotation`: 4 numbers (returned as raw quaternion components)
  39. - `scale`: 3 numbers
  40. - `weights`: variable, contains 1 number for each blend shape in the node
  41. ]],
  42. related = {
  43. 'ModelData:getAnimationSmoothMode',
  44. 'ModelData:getAnimationKeyframeCount'
  45. }
  46. }