Torque script problem

Ok, I finally got Blender exporter running for Torque…well sort of thanks to this:

and to set up python under windows this :

and got the scripts here:

Now I get a script error:

Using a clean Global Dictionary.
DTS Exporter 0.400000
Exporting to: e:\documents\created mp\pythonexport\sphere.dts
Loaded Config File e:\documents\created mp\pythonexport\sphere.cfg
> Adding Triggers
> Adding Root Bone
> Adding Object Mesh
Traceback (most recent call last):
File “D:\Python23\lib\”, line 920, in ?
File “D:\Python23\lib\”, line 909, in exportModel
Shape = BlenderShape()
File “D:\Python23\lib\”, line 510, in init
realname = “%s_%s” % (realname, obname[1])
IndexError: list index out of range

Any Ideas? Because I’m at the end of my googling capacities as to where this problem comes from

“I am, therefore I be.”

Well with the path D:\Python23… is it safe to assume you installed Python 2.3.x? You’re supposed to install Python 2.2.x. The tutorial you linked even says so.

Yes I installed python 2.3 and verified the path (adapted the tutorial so the autoexec points to python23 dir), it works otherwise the script wouldn’t even run (would it?)
I’ve put the .py files I need in the python lib directory.

Ok the problem was pointed kindly to me by James Urquhart the writer of the code, seems I ommitted to give the right name to my texture :slight_smile:

His answer:

Quite simple to fix.

Its crashing out in this code :

if Prefs.manualDetail == 1: realname = “%s_%s” % (realname, obname[1])

I assume you turned on “Manual Detail Levels” in either the .cfg file or the gui.
Make sure the Object Name for all your meshes is in the format :
<Object Name>_<Detail Level Number>

Otherwise when it splits the string, there will only be 1 string in the splitted array, therefor it will crash out when accessing element 1 :slight_smile:

On another note, i am aiming to release an improved version of the exporter soon that has a better way of getting materials from blender (no more texture name material name hacking), and of course a tidied up gui :wink:

Sweeeeeeeet. i have been waiting for a blender exporter for torque. I got the game engine but no software i know to use it lol.

So you got the fixed version? Or is it the top one still but fixed?

The top one works fine, if you give your textures the same name as the mesh, James is trying to fix it so you can add any texture (whatever it’s named) to the mesh instead.