notes/Blender 3D Python Code for Adding Text with Material-s1NdeF9m.sh
#Blender 3D - Create Text Object and add Random Colored Material

#By Kris Occhipinti - October 29th,2018
#filmsbykris.com
#GPLv3 - https://www.gnu.org/licenses/gpl-3.0.txt


import bpy
from random import random

bpy.ops.object.text_add(radius=1, view_align=False, enter_editmode=True, location=(0, 0, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.font.select_all()
bpy.ops.font.text_insert(text="www.FilmsByKris.com")
bpy.ops.object.editmode_toggle()

bpy.context.object.data.extrude = 0.046
bpy.context.object.data.align_x = 'CENTER'
bpy.ops.transform.rotate(value=1.5708, axis=(1, 0, 0), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
bpy.context.object.data.bevel_depth = 0.028

mat = bpy.data.materials.new(name="Material")
bpy.context.active_object.data.materials.append(mat)
bpy.context.object.active_material.diffuse_color = (random(),random(),random())

syntax highlighted by Code2HTML, v. 0.9.1