~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to source/blender/python/api2_2x/doc/Material.py

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
                - SPEC_BLINN         - Make Material use the Blinn specular shader.
81
81
                - SPEC_TOON      - Make Material use the toon specular shader.
82
82
                - SPEC_WARDISO      - Make Material use the Ward-iso specular shader.
 
83
 
 
84
@type ColorbandMethod: readonly dictionary
 
85
@var ColorbandMethod: The available Colorband mixing methods.
 
86
                - ADD  - Make Material use the Add method.
 
87
                - BLEND  - Make Material use the Blend/Mix method.
 
88
                - BURN  - Make Material use the Burn method.
 
89
                - COLOR  - Make Material use the Color method.
 
90
                - DARK  - Make Material use the Darken method.
 
91
                - DIFF  - Make Material use the Difference method.
 
92
                - DIV  - Make Material use the Divide method.
 
93
                - DODGE  - Make Material use the Dodge method.
 
94
                - HUE  - Make Material use the Hue method.
 
95
                - LIGHT  - Make Material use the Lighten method.
 
96
                - MIX  - Make Material use the Blend/Mix method.
 
97
                - MULT  - Make Material use the Multiply method.
 
98
                - OVERLAY  - Make Material use the Overlay method.
 
99
                - SAT  - Make Material use the Saturation method.
 
100
                - SCREEN  - Make Material use the Screen method.
 
101
                - SUB  - Make Material use the Substract method.
 
102
                - VAL  - Make Material use the Value method.
 
103
 
 
104
@type ColorbandInput: readonly dictionary
 
105
@var ColorbandInput: The available Colorband Input sources.
 
106
                - ENERGY  - Make Material use the Energy input.
 
107
                - NORMAL  - Make Material use the Normal input.
 
108
                - RESULT  - Make Material use the Result input.
 
109
                - SHADER  - Make Material use the Shader input.
 
110
 
 
111
 
83
112
"""
84
113
 
85
114
def New (name = 'Mat'):
183
212
        Value is clamped to the range [0.0,100.0].
184
213
        @type haloSize:  float
185
214
        @ivar hard:  Hardness of the specularity.
186
 
        Value is clamped to the range [1,255].
 
215
        Value is clamped to the range [1,511].
187
216
        @type hard:  int
188
217
        @ivar ipo:  Material Ipo data.
189
218
        Contains the Ipo if one is assigned to the object, None otherwise.  Setting to None clears the current Ipo.
323
352
        each color a list of 5 floats [0 - 1], [r,g,b,a,pos].
324
353
        The colorband can have between 1 and 31 colors.
325
354
        @type colorbandSpecular:  list
326
 
        
 
355
        @ivar colorbandDiffuseInput: Material Diffuse colorband input.
 
356
        The integer result must be compared with L{ColorbandInput}
 
357
        dictionary.
 
358
        @type colorbandDiffuseInput: int
 
359
        @ivar colorbandDiffuseMethod: Material Diffuse colorband method.
 
360
        The integer result must be compared with L{ColorbandMethod}
 
361
        dictionary.
 
362
        @type colorbandDiffuseMethod: int
 
363
        @ivar colorbandDiffuseFactor: Material Diffuse colorband factor.
 
364
        Value is clamped to the range [0.0,1.0].
 
365
        @type colorbandDiffuseFactor: float
 
366
        @ivar colorbandSpecularInput: Material Specular colorband input.
 
367
        The integer result must be compared with L{ColorbandInput}
 
368
        dictionary.
 
369
        @type colorbandSpecularInput: int
 
370
        @ivar colorbandSpecularMethod: Material Specular colorband method.
 
371
        The integer result must be compared with L{ColorbandMethod}
 
372
        dictionary.
 
373
        @type colorbandSpecularMethod: int
 
374
        @ivar colorbandSpecularFactor: Material Specular colorband factor.
 
375
        Value is clamped to the range [0.0,1.0].
 
376
        @type colorbandSpecularFactor: float
 
377
        @type enabledTextures: list of integers
 
378
        @ivar enabledTextures: The texture channels enabled in this material.
 
379
                The attribute returns is list of integers in the range [0, 9], each
 
380
                number representing the respective enabled MTex entry (see
 
381
                L{getTextures()<getTextures>}).  Enabling is done by assigning
 
382
                a list of ints or an empty list.  Attempting to enable a channel
 
383
                which does not have a texture assigned to it will result in a
 
384
                ValueError exception.
 
385
                Example::
 
386
                        mat.enabledTextures = []  # no texture channels are enabled
 
387
                        mat.enabledTextures = [0, 6] # texture channels 0 and 6 are enabled
 
388
                        ch = mat.enabledTextures
 
389
                        ch.append(4)
 
390
                        mat.enabledTextures = ch
 
391
                        print mat.enabledTextures # will print: [0, 4, 6]
 
392
 
 
393
        @type textures: a tuple of Blender MTex objects.
 
394
        @ivar textures: the Material's Texture list.  Empty texture channels contains None.
327
395
        @ivar enableSSS:  If True, subsurface scattering will be rendered on this material.
328
396
        @type enableSSS:  bool
329
397
        @ivar sssScale:  If True, subsurface scattering will be rendered on this material.
1010
1078
 
1011
1079
        def setTexture(index, texture, texco, mapto):
1012
1080
                """
1013
 
                Assign a Blender Texture object to slot number 'number'.
 
1081
                Assign a Blender Texture object to channel number 'number'.
1014
1082
                @type index: int
1015
1083
                @param index: material's texture index in [0, 9].
1016
1084
                @type texture: Blender Texture
1033
1101
                Get this Material's Texture list.
1034
1102
                @rtype: list of MTex
1035
1103
                @return: a list of Blender MTex objects.  None is returned for each empty
1036
 
                                texture slot.
 
1104
                                texture channel.
1037
1105
                """
1038
1106
 
1039
1107
        def getScriptLinks (event):
1070
1138
                @return:  a copy of this material
1071
1139
                """
1072
1140
 
 
1141
        def freeNodes ():
 
1142
                """
 
1143
                Removes the node tree from this material.
 
1144
                @rtype: bool
 
1145
                @return:  true if nodes were freed from this material.
 
1146
                """
 
1147
 
1073
1148
import id_generics
1074
1149
Material.__doc__ += id_generics.attributes