In my code below, I want to define a RGB color and specular color:
import bpy
from math import *
Name = 'Dimi'
bpy.ops.mesh.primitive_cylinder_add(radius = 0.5, depth = 1)
scj = bpy.context.scene
ob = bpy.context.object
me = ob.data
ob.name = Name
ma0 = bpy.data.materials.get("furniture")
ma = ma0.copy()
ma.name = 'furniture_' + Name
ob.data.materials.append(ma)
ncolor = []
for c in color:
ncolor.append(c*0.003921)
#defining main color
ma.rgbCol = [ncolor[0]*0.962,ncolor[1]*0.962,ncolor[2]*0.962]
#defining specular color
specCol = [0,0,0]
But in:
#defining main color
ma.rgbCol = [ncolor[0]*0.962,ncolor[1]*0.962,ncolor[2]*0.962]
#defining specular color
specCol = [0,0,0]
That is a blender 2.49 code that I can't find how to make work in Blender 2.74