setNodeScale.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. return {
  2. summary = 'Set or blend the scale of a node.',
  3. description = [[
  4. Sets or blends the scale of a node to a new scale. This sets the local scale of the node,
  5. relative to its parent.
  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. sx = {
  17. type = 'number',
  18. description = 'The x scale.'
  19. },
  20. sy = {
  21. type = 'number',
  22. description = 'The y scale.'
  23. },
  24. sz = {
  25. type = 'number',
  26. description = 'The z scale.'
  27. },
  28. scale = {
  29. type = 'Vec3',
  30. description = 'The new scale.'
  31. },
  32. blend = {
  33. type = 'number',
  34. default = '1.0',
  35. description = [[
  36. A number from 0 to 1 indicating how much of the new scale to blend in. A value of 0 will
  37. not change the node's scale at all, whereas 1 will fully blend to the target scale.
  38. ]]
  39. }
  40. },
  41. returns = {},
  42. variants = {
  43. {
  44. arguments = { 'index', 'sx', 'sy', 'sz', 'blend' },
  45. returns = {}
  46. },
  47. {
  48. arguments = { 'name', 'sx', 'sy', 'sz', 'blend' },
  49. returns = {}
  50. },
  51. {
  52. arguments = { 'index', 'scale', 'blend' },
  53. returns = {}
  54. },
  55. {
  56. arguments = { 'name', 'scale', 'blend' },
  57. returns = {}
  58. }
  59. },
  60. notes = [[
  61. For best results when animating, it's recommended to keep the 3 scale components the same.
  62. ]],
  63. related = {
  64. 'Model:getNodePosition',
  65. 'Model:setNodePosition',
  66. 'Model:getNodeOrientation',
  67. 'Model:setNodeOrientation',
  68. 'Model:getNodePose',
  69. 'Model:setNodePose',
  70. 'Model:getNodeTransform',
  71. 'Model:setNodeTransform',
  72. 'Model:animate'
  73. }
  74. }