Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/Tools/3dsmaxExport/MaxscriptExport/scripts/ogre/lib/OgreMaterialPlugin.ms @ 6

Last change on this file since 6 was 6, checked in by anonymous, 17 years ago

=…

File size: 1.6 KB
Line 
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
5plugin material OgreMaterial
6name:"OGRE Material"
7classID:#(695425,446581)
8extends:Standard replaceUI:true version:1
9(
10        parameters main rollout:paramsRollout
11        (
12                ambient type:#color default:blue ui:ambientColor 
13                diffuse type:#color default:blue ui:diffuseColor
14                specular type:#color default:black ui:specularColor
15                selfIllumColor type:#color default:black ui:selfIllumColor
16                specularLevel type:#Integer ui:specularLevel
17            diffuseMap type:#texturemap ui:diffuseMap
18               
19                on ambient set val do delegate.ambient_color = val
20                on diffuse set val do delegate.diffuse_color = val
21                on specular set val do delegate.specular_color = val
22                on selfIllumColor set val do delegate.self_Illum_color = val
23                on specularLevel set val do delegate.specular_level = val
24                on diffuseMap set val do delegate.diffuseMap = val
25        )
26       
27        rollout paramsRollout "OGRE Material Parameters"
28        (
29                colorpicker ambientColor "ambient color: " align:#right
30                colorpicker diffuseColor "diffuse color: " align:#right
31                colorpicker specularColor "specular color: " align:#right
32                colorpicker selfIllumColor "emissive color: " align:#right
33                spinner specularLevel "specular level in %:" range:[0,1000,0] type:#Integer ;
34                label l1 "Choose the diffuse map" align:#left;
35                mapbutton diffuseMap "" align:#right ;
36        )
37       
38        on create do
39        (
40                -- setup initial material
41                -- delegate.opacityFalloff = 75
42                delegate.useSelfIllumColor=true ;
43                -- delegate.diffuseMapEnable = false ;
44        )
45
46)
Note: See TracBrowser for help on using the repository browser.