GingerBread textures

Ever done ?
and you know how to do it by Python?
If not, use this code

import bpy
def step19():
    print("step19 texture toevoegen")
    gus =['Gus'] 
    gusTextureStucci ='GusTexStucci', type = 'STUCCI')
    gusTextureStucci.stucci_type = "WALL_OUT"
    gus_material = gus.material_slots[0].material
    gus_material.active_texture_index = 0
    gus_material.active_texture = gusTextureStucci
    activeStucciTex = gus_material.texture_slots[0]
    activeStucciTex.mapping = 'CUBE'
    activeStucciTex.use_map_color_diffuse = False
    activeStucciTex.use_map_normal = True
    activeStucciTex.normal_factor = 0.75
    gusTextureGrain ='GusTexGrain', type = 'NOISE')
    gus_material.active_texture_index = 1
    gus_material.active_texture = gusTextureGrain
    activeGrainTex = gus_material.texture_slots[1]
    activeGrainTex.mapping = 'CUBE'
    activeGrainTex.use_map_color_diffuse = False
    activeGrainTex.use_map_normal = True
    activeGrainTex.normal_factor = 0.4


It is comming from my stepwize addon, namely the step2 to step18 build Gus-body ;-).

The important steps (Knoff Hoff!) are these:
Gus must have a material
Build a suitable texture (STUCCI e.g.)
You need (I think at least now) a textures_slot element
to set all the parameters you need/want, found by mouse over the texture property you want to set (in running Blender the textures-node open)

Nice, isn’t it!