OgreMaterialPlugin.ms 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. -- this is a level 3 plug-in, the beginnings of a custom glass material.
  2. -- It extends Standard material and replaces its UI with a single
  3. -- rollout with 2 spinners and a color picker
  4. plugin material OgreMaterial
  5. name:"OGRE Material"
  6. classID:#(695425,446581)
  7. extends:Standard replaceUI:true version:1
  8. (
  9. parameters main rollout:paramsRollout
  10. (
  11. ambient type:#color default:blue ui:ambientColor
  12. diffuse type:#color default:blue ui:diffuseColor
  13. specular type:#color default:black ui:specularColor
  14. selfIllumColor type:#color default:black ui:selfIllumColor
  15. specularLevel type:#Integer ui:specularLevel
  16. diffuseMap type:#texturemap ui:diffuseMap
  17. on ambient set val do delegate.ambient_color = val
  18. on diffuse set val do delegate.diffuse_color = val
  19. on specular set val do delegate.specular_color = val
  20. on selfIllumColor set val do delegate.self_Illum_color = val
  21. on specularLevel set val do delegate.specular_level = val
  22. on diffuseMap set val do delegate.diffuseMap = val
  23. )
  24. rollout paramsRollout "OGRE Material Parameters"
  25. (
  26. colorpicker ambientColor "ambient color: " align:#right
  27. colorpicker diffuseColor "diffuse color: " align:#right
  28. colorpicker specularColor "specular color: " align:#right
  29. colorpicker selfIllumColor "emissive color: " align:#right
  30. spinner specularLevel "specular level in %:" range:[0,1000,0] type:#Integer ;
  31. label l1 "Choose the diffuse map" align:#left;
  32. mapbutton diffuseMap "" align:#right ;
  33. )
  34. on create do
  35. (
  36. -- setup initial material
  37. -- delegate.opacityFalloff = 75
  38. delegate.useSelfIllumColor=true ;
  39. -- delegate.diffuseMapEnable = false ;
  40. )
  41. )