setNodePose.lua 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. return {
  2. summary = 'Set or blend the pose of a node.',
  3. description = [[
  4. Sets or blends the pose (position and orientation) of a node to a new pose. This sets the local
  5. pose of the node, relative to its parent. The scale will remain unchanged.
  6. ]],
  7. arguments = {
  8. index = {
  9. type = 'number',
  10. description = 'The index of the node.'
  11. },
  12. name = {
  13. type = 'string',
  14. description = 'The name of the node.'
  15. },
  16. x = {
  17. type = 'number',
  18. description = 'The x component of the position.'
  19. },
  20. y = {
  21. type = 'number',
  22. description = 'The y component of the position.'
  23. },
  24. z = {
  25. type = 'number',
  26. description = 'The z component of the position.'
  27. },
  28. angle = {
  29. type = 'number',
  30. description = 'The number of radians the node should be rotated around its rotation axis.'
  31. },
  32. ax = {
  33. type = 'number',
  34. description = 'The x component of the axis of rotation.'
  35. },
  36. ay = {
  37. type = 'number',
  38. description = 'The y component of the axis of rotation.'
  39. },
  40. az = {
  41. type = 'number',
  42. description = 'The z component of the axis of rotation.'
  43. },
  44. position = {
  45. type = 'Vec3',
  46. description = 'The target position. Can also be provided as 3 numbers.'
  47. },
  48. orientation = {
  49. type = 'Quat',
  50. description = 'The target orientation. Can also be provided as 4 numbers in angle-axis form.'
  51. },
  52. blend = {
  53. type = 'number',
  54. default = '1.0',
  55. description = [[
  56. A number from 0 to 1 indicating how much of the target pose to blend in. A value of 0 will
  57. not change the node's pose at all, whereas 1 will fully blend to the target pose.
  58. ]]
  59. }
  60. },
  61. returns = {},
  62. variants = {
  63. {
  64. arguments = { 'index', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'blend' },
  65. returns = {}
  66. },
  67. {
  68. arguments = { 'name', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'blend' },
  69. returns = {}
  70. },
  71. {
  72. arguments = { 'index', 'position', 'orientation', 'blend' },
  73. returns = {}
  74. },
  75. {
  76. arguments = { 'name', 'position', 'orientation', 'blend' },
  77. returns = {}
  78. }
  79. },
  80. related = {
  81. 'Model:getNodePosition',
  82. 'Model:setNodePosition',
  83. 'Model:getNodeOrientation',
  84. 'Model:setNodeOrientation',
  85. 'Model:getNodeScale',
  86. 'Model:setNodeScale',
  87. 'Model:getNodeTransform',
  88. 'Model:setNodeTransform',
  89. 'Model:animate'
  90. }
  91. }