Module: Material | ./Material.py | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The Blender Material moduleThis 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
|