So, I want to make my text glows. Using python. Until now, I've scripted this, after reading some tutorials:
import bpy
def create():
bpy.ops.object.text_add(location=(0, 0, 0))
text_obj = bpy.context.object
#'glow'
scene = bpy.context.scene
scene.world.light_settings.use_indirect_light = True
scene.world.light_settings.gather_method = 'APPROXIMATE'
scene.world.light_settings.passes = 2
mat = makeMaterial("font", (1,1,1), 1.8)
text_obj.active_material = mat
def makeMaterial(name, color, emit):
mat = bpy.data.materials.new(name)
mat.diffuse_color = color
mat.diffuse_shader = 'LAMBERT'
mat.diffuse_intensity = 1.0
mat.specular_color = color
mat.specular_shader = 'COOKTORR'
mat.specular_intensity = 0
mat.use_transparency = True
#mat.raytrace_transparency.fresnel = 2
#mat.alpha = transp
mat.emit = emit
return mat
if __name__ == "__main__":
create()
Why this isn't working good?
Tks
import bpy
- fix thereturn mat
identation - add a call at the endcreate()
and it should work $\endgroup$