getNodeTransform.lua 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. return {
  2. summary = 'Get the local transform of a node.',
  3. description = [[
  4. Returns local transform (position, orientation, and scale) of a node, relative to its parent.
  5. ]],
  6. arguments = {
  7. index = {
  8. type = 'number',
  9. description = 'The index of the node.'
  10. },
  11. name = {
  12. type = 'string',
  13. description = 'The name of the node.'
  14. }
  15. },
  16. returns = {
  17. x = {
  18. type = 'number',
  19. description = 'The x coordinate.'
  20. },
  21. y = {
  22. type = 'number',
  23. description = 'The y coordinate.'
  24. },
  25. z = {
  26. type = 'number',
  27. description = 'The z coordinate.'
  28. },
  29. sx = {
  30. type = 'number',
  31. description = 'The x scale.'
  32. },
  33. sy = {
  34. type = 'number',
  35. description = 'The y scale.'
  36. },
  37. sz = {
  38. type = 'number',
  39. description = 'The z scale.'
  40. },
  41. angle = {
  42. type = 'number',
  43. description = 'The number of radians the node is rotated around its axis of rotation.'
  44. },
  45. ax = {
  46. type = 'number',
  47. description = 'The x component of the axis of rotation.'
  48. },
  49. ay = {
  50. type = 'number',
  51. description = 'The y component of the axis of rotation.'
  52. },
  53. az = {
  54. type = 'number',
  55. description = 'The z component of the axis of rotation.'
  56. }
  57. },
  58. variants = {
  59. {
  60. arguments = { 'index' },
  61. returns = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' }
  62. },
  63. {
  64. arguments = { 'name' },
  65. returns = { 'x', 'y', 'z', 'sx', 'sy', 'sz', 'angle', 'ax', 'ay', 'az' }
  66. }
  67. },
  68. notes = [[
  69. For best results when animating, it's recommended to keep the 3 components of the scale the
  70. same.
  71. ]],
  72. related = {
  73. 'ModelData:getNodePosition',
  74. 'ModelData:getNodeOrientation',
  75. 'ModelData:getNodeScale',
  76. 'ModelData:getNodePose'
  77. }
  78. }