setBlendShapeWeight.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. return {
  2. summary = 'Set the weight of a blend shape.',
  3. description = [[
  4. Sets the weight of a blend shape. A blend shape contains offset values for the vertices of one
  5. of the meshes in a Model. Whenever the Model is drawn, the offsets are multiplied by the weight
  6. of the blend shape, allowing for smooth blending between different meshes. A weight of zero
  7. 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. weight = {
  19. type = 'number',
  20. description = 'The new weight for the blend shape.'
  21. },
  22. },
  23. returns = {},
  24. variants = {
  25. {
  26. arguments = { 'index', 'weight' },
  27. returns = {}
  28. },
  29. {
  30. arguments = { 'name', 'weight' },
  31. returns = {}
  32. }
  33. },
  34. notes = [[
  35. The initial weights are declared in the model file.
  36. Weights can be any number, but usually they're kept between 0 and 1.
  37. This function will throw an error if the blend shape name or index doesn't exist.
  38. ]],
  39. related = {
  40. 'Model:getBlendShapeCount',
  41. 'Model:getBlendShapeName',
  42. 'Model:resetBlendShapes'
  43. }
  44. }