How do I create an MTex in Blender 2.49 ?

I’m trying to set a world texture and having trouble doing that.

So far I’m creating a texture

import Blender 
from Blender import * 
import bpy 
world = World.GetCurrent() 
worldTex = Texture.New('worldTex') 
worldIm = Image.Load('//blender_scene/tex/bg 001.jpg') 
worldIm.source = Image.Sources.SEQUENCE 

The only way I’ve spotted access to the world textures is through World.textures. It holds MTex references though.

Do I need to create a MTex ? How do I do that ?
How do I set a world texture ?


If I just create a material and try to assign it’s textures to world.textures I get this error:

TypeError: expected tuple or list containing world MTex objects and NONE

Is there such a thing as a ‘world MTex’ ? Does it differ from any MTex intance ?

Did you ever solve this? The problem seems to be related to the fact that there is both [MTex (Material)] and [MTex (World)], they are not interchangeable. The docs do not cover MTex for World. The only way I see getting it to work is if there is already a Texture object applied to a World and you retrieve it and manipulate it. Having to use the UI to pre-create some World objects with textures does not seem to be an ideal situation.