getBlendShapeWeight.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. return {
  2. summary = 'Get the weight of a blend shape.',
  3. description = [[
  4. Returns the weight of a blend shape. A blend shape contains offset values for the vertices of
  5. one of the meshes in a Model. Whenever the Model is drawn, the offsets are multiplied by the
  6. weight of the blend shape, allowing for smooth blending between different meshes. A weight of
  7. zero won't apply any displacement and will skip processing of the blend shape.
  8. ]],
  9. arguments = {
  10. index = {
  11. type = 'number',
  12. description = 'The index of a blend shape.'
  13. },
  14. name = {
  15. type = 'string',
  16. description = 'The name of a blend shape.'
  17. }
  18. },
  19. returns = {
  20. weight = {
  21. type = 'number',
  22. description = 'The weight of the blend shape.'
  23. }
  24. },
  25. variants = {
  26. {
  27. arguments = { 'index' },
  28. returns = { 'weight' }
  29. },
  30. {
  31. arguments = { 'name' },
  32. returns = { 'weight' }
  33. }
  34. },
  35. notes = [[
  36. The initial weights are declared in the model file.
  37. Weights can be any number, but usually they're kept between 0 and 1.
  38. This function will throw an error if the blend shape name or index doesn't exist.
  39. ]],
  40. related = {
  41. 'Model:getBlendShapeCount',
  42. 'Model:getBlendShapeName',
  43. 'Model:resetBlendShapes'
  44. }
  45. }