Exporter fails on triggers
by Jari · in Artist Corner · 06/21/2007 (3:13 pm) · 15 replies
Hi, I'm trying to export a shape with triggers in the run animation but the exporter scripts throws this exception:
The blender version is 2.44 and exporter script is the latest, 0.945
I found out this problem first with one of my models when I added the trigger but then I downloaded this blender model: http://tdn.garagegames.com/wiki/Image:TriggerPlayerMesh.blend.zip and it also fails when you try to export it.
I hope this information is useful for fixing the bug. It seems that the trigger's state flag goes out of range (from 32bit)
Writing out DTS...
Error: Exception encountered, bailing out.
<type 'exceptions.Exception'>
Traceback (most recent call last):
File "<string>", line 738, in process
File "C:\Documents and Settings\Omistaja\Application Data\Blender Foundation\Blender\.blender\scripts\DTSPython\Dts_Shape.py", line 764, in write
dstream.writeTrigger(cnt)
File "C:\Documents and Settings\Omistaja\Application Data\Blender Foundation\Blender\.blender\scripts\DTSPython\Dts_Stream.py", line 443, in writeTrigger
self.writes32(value.state)
File "C:\Documents and Settings\Omistaja\Application Data\Blender Foundation\Blender\.blender\scripts\DTSPython\Dts_Stream.py", line 230, in writes32
self.write32(value)
File "C:\Documents and Settings\Omistaja\Application Data\Blender Foundation\Blender\.blender\scripts\DTSPython\Dts_Stream.py", line 197, in write32_py25
self.buffer32.append(value)
OverflowError: long int too large to convert to intThe blender version is 2.44 and exporter script is the latest, 0.945
I found out this problem first with one of my models when I added the trigger but then I downloaded this blender model: http://tdn.garagegames.com/wiki/Image:TriggerPlayerMesh.blend.zip and it also fails when you try to export it.
I hope this information is useful for fixing the bug. It seems that the trigger's state flag goes out of range (from 32bit)
#2
But I still did not get the trigges working and I found out that there is this check in the engine:
if (TSShape::smReadVersion<22)
at:
void TSShape::Sequence::read(Stream * s, bool readNameIndex)
in:
tsShapeOldRead.cc
So I wonder is my copy of the engine outdated or? I'm using winmerge and it seems to be same as 1.5.2
Jari.
06/22/2007 (6:05 am)
Thank you Joseph, it exports now!But I still did not get the trigges working and I found out that there is this check in the engine:
if (TSShape::smReadVersion<22)
at:
void TSShape::Sequence::read(Stream * s, bool readNameIndex)
in:
tsShapeOldRead.cc
So I wonder is my copy of the engine outdated or? I'm using winmerge and it seems to be same as 1.5.2
Jari.
#3
06/22/2007 (8:54 am)
...
#4
06/22/2007 (3:56 pm)
...
#5
You are right about the check for version 8 but above that is check for version 22. And when the dts is loaded the version is 24. This results that the MakePath flag is not set and thefore no calls to animateTriggers() is made.
I debugged in tsShapeOldRead.cc at line 1373 to find this out. That's where the if (TSShape::smReadVersion<22) check is.
Are you running 1.5.2 TGE as well? They made quite many changes in the thread functions...
I'm still trying to find out in case there's just something wrong in my copy of the engine but I doupt.
06/23/2007 (12:54 pm)
Thank you Joseph for taking time to check this. You are right about the check for version 8 but above that is check for version 22. And when the dts is loaded the version is 24. This results that the MakePath flag is not set and thefore no calls to animateTriggers() is made.
I debugged in tsShapeOldRead.cc at line 1373 to find this out. That's where the if (TSShape::smReadVersion<22) check is.
Are you running 1.5.2 TGE as well? They made quite many changes in the thread functions...
I'm still trying to find out in case there's just something wrong in my copy of the engine but I doupt.
#6
06/23/2007 (1:50 pm)
...
#7
06/23/2007 (2:06 pm)
...
#8
But while at this thread I might as well ask if you know why does my model now export without textures? I did notice that there is new materials pane but I'd expect the material to be listed there but it's not. What could be the problem?
Do they now need to have image the property? I tried adding that but it did not help at the first place.
Jari.
06/25/2007 (3:15 am)
Thanks! That explains it, the ground transtorm was indeed required.But while at this thread I might as well ask if you know why does my model now export without textures? I did notice that there is new materials pane but I'd expect the material to be listed there but it's not. What could be the problem?
Do they now need to have image the property? I tried adding that but it did not help at the first place.
Jari.
#9
06/25/2007 (5:47 am)
...
#10
So to answer your question Joseph, no I don't use UV mapping. This is because I just have some simple wood or just one color texture in my models.
Hmm this may cause some extra work because I have many models that use the old way for loading the texture. Do you know if it's possible to check is the UV image selected/loaded and if not then use the old method for the texture in export? (I mean in the exporter script.)
Well thanks again. :)
06/25/2007 (7:48 am)
I see now what was needed. I had to load the texture in the UV image editor. So to answer your question Joseph, no I don't use UV mapping. This is because I just have some simple wood or just one color texture in my models.
Hmm this may cause some extra work because I have many models that use the old way for loading the texture. Do you know if it's possible to check is the UV image selected/loaded and if not then use the old method for the texture in export? (I mean in the exporter script.)
Well thanks again. :)
#11
06/25/2007 (8:33 am)
...
#12
06/26/2007 (12:33 pm)
Hey, cool. Hopefully it's possible by the blender API.
#13
07/02/2007 (2:19 pm)
...
#14
07/12/2007 (9:19 pm)
Joseph, ok I sent you one blend. :)
#15
07/17/2007 (7:00 pm)
...
Torque Owner Redacted