Table of Contents

Module: Material ./Material.py

The Blender Material module

This module provides access to Material datablocks

Example:

    from Blender import Material, NMesh, Object, Scene
    m = Material.New()                         # create free Material datablock
    m.rgbCol = (1.0, 0.0, 0.3)                    # assign RGB values
    mesh = NMesh.GetRaw()                      # get new mesh
    mesh.addMaterial(m)                        # add material to mesh
    object = Object.New('Mesh')                # create new object 
    object.link(mesh)                          # link mesh data to object
    Scene.getCurrent().link(ob)                # link object to current scene


Functions   
New
_getMir
_getRGB
_getSpec
_setMir
_setRGB
_setSpec
get
  New 
New ( name=None )

Creates a new, empty Material and returns it.

Example:

  from Blender import Material
  mat = Material.New()

  _getMir 
_getMir ( obj )

  _getRGB 
_getRGB ( obj )

  _getSpec 
_getSpec ( obj )

  _setMir 
_setMir ( obj,  rgb )

  _setRGB 
_setRGB ( obj,  rgb )

  _setSpec 
_setSpec ( obj,  rgb )

  get 
get ( name=None )

If name given, the Material name is returned if existing, None otherwise. If no name is given, a list of all Materials is returned

Classes   
Material

Material DataBlock object

ModeFlags

Readonly dictionary


Table of Contents

This document was automatically generated on Mon Feb 25 13:52:14 2002 by HappyDoc version r1_5