__author__ = 'thoth'
import bpy
def mission1(obj):
mat = bpy.data.materials.new("bacon")
mat.diffuse_color=(0.8,0,1)
obj.data.materials[0] = mat
obj = bpy.context.active_object
mission1(obj)
|
Blender python API quick-start
Syntax highlighting by Pygments.