def get_ray_material(self): if 'RayMat' in bpymorse.get_materials(): return bpymorse.get_material('RayMat') ray_material = bpymorse.create_new_material() ray_material.diffuse_color = (.9, .05, .2) ray_material.use_shadeless = True ray_material.use_raytrace = False # ? is it needed ? ray_material.use_cast_buffer_shadows = False # ? is it needed ? ray_material.use_cast_approximate = False # ? is it needed ? ray_material.use_transparency = True ray_material.transparency_method = 'Z_TRANSPARENCY' ray_material.alpha = 0.3 ray_material.name = 'RayMat' # link material to object as: Arc_XXX.active_material = ray_material return ray_material