getMaterial.lua 835 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. return {
  2. summary = 'Get a Material from the Model.',
  3. description = [[
  4. Returns a Material loaded from the Model, by name or index.
  5. This includes `Texture` objects and other properties like colors, metalness/roughness, and more.
  6. ]],
  7. arguments = {
  8. name = {
  9. type = 'string',
  10. description = 'The name of the Material to return.'
  11. },
  12. index = {
  13. type = 'number',
  14. description = 'The index of the Material to return.'
  15. }
  16. },
  17. returns = {
  18. material = {
  19. type = 'Material',
  20. description = 'The material.'
  21. }
  22. },
  23. variants = {
  24. {
  25. arguments = { 'name' },
  26. returns = { 'material' }
  27. },
  28. {
  29. arguments = { 'index' },
  30. returns = { 'material' }
  31. }
  32. },
  33. related = {
  34. 'Model:getMaterialCount',
  35. 'Model:getMaterialName',
  36. 'Material'
  37. }
  38. }