fixing BlenderToCal3D script to work with 2.4
Moderators: jesterKing, stiv
fixing BlenderToCal3D script to work with 2.4
Hi, I'm trying to fix the one that comes with blender but I got stuck in a silly error.
I posted the error and the modified code I came up with here:
http://www.gamedev.net/community/forums ... 1�.
Just in case somebody wants to help.
I posted the error and the modified code I came up with here:
http://www.gamedev.net/community/forums ... 1�.
Just in case somebody wants to help.
-
- Posts: 0
- Joined: Sun Jan 08, 2006 6:27 am
Hello.
http://www.blender3d.org/documentation/ ... .html#roll
You will see that bone.roll is a dictionary, which contains two keys 'ARMATURESPACE' and 'BONESPACE'.
To get the old behavior change line 872 from
To:
Hope that helps.
- Joe Greenawalt
The problem is on line 872 in treat_bone. If you take a look over here:Traceback (most recent call last):
File "blender2cal3d.py", line 1201, in fs_callback
export(filename)
File "blender2cal3d.py", line 925, in export
treat_bone(b)
File "blender2cal3d.py", line 872, in treat_bone
quat = matrix2quaternion(blender_bone2matrix(head, tail, b.roll))
File "blender2cal3d.py", line 371, in blender_bone2matrix
rMatrix = matrix_rotate(nor, roll)
File "blender2cal3d.py", line 275, in matrix_rotate
cos = math.cos(angle)
TypeError: a float is required
http://www.blender3d.org/documentation/ ... .html#roll
You will see that bone.roll is a dictionary, which contains two keys 'ARMATURESPACE' and 'BONESPACE'.
To get the old behavior change line 872 from
Code: Select all
quat = matrix2quaternion(blender_bone2matrix(head, tail, b.roll))
Code: Select all
quat = matrix2quaternion(blender_bone2matrix(head, tail, b.roll['BONESPACE']))
- Joe Greenawalt
Cool. Sadly I won't be connecting from a computer I've chances to instal CVS in during this week so I won't be able to use an snapshot to test the script.LetterRip wrote:no I mean scripts that worked with 2.37a will more easily work with 2.41 than with 2.40.
LetterRip
I'll wait until 2.41 is released.
I wrote an exporter to MD5 (Doom3 engine model format) that is based on Jiba's Cal3D exporter. It's updated and works with 2.40. Maybe you can get some ideas from there.
http://home.tiscali.de/der_ton/blender2md5.rar
http://home.tiscali.de/der_ton/blender2md5.rar
I'm happy to hear someone is going to work on this! 
Just in case you didn't know: you say you are using the script that comes with blender? IT is not the most up-to-date blender2cal3d script, it's the 0.9 version. There is a 0.10 version located here:
http://home.netspeed.com.au/mcginnes/bl ... cal3d_2.py
it's nicer because it has a better gui.

Just in case you didn't know: you say you are using the script that comes with blender? IT is not the most up-to-date blender2cal3d script, it's the 0.9 version. There is a 0.10 version located here:
http://home.netspeed.com.au/mcginnes/bl ... cal3d_2.py
it's nicer because it has a better gui.
-
- Posts: 0
- Joined: Tue Jan 24, 2006 6:11 am
well, it doesn't crash.
I'm a game programmer and I've written my share of exporters. I just wanted to be able to export from blender in cal3d so I fixed the problems that kept this from completing an export. Seems like it's doing xml only at the moment.
the problem is that I don't really have any blender files to test this export on. I just made a cube with an armature. If someone has something better to test, I wouldn't mind getting it going. or at least giving it a shot.
-tawn
tawnkramer@gmail.com
also, I don't think I can post the python script here without ruining the whitespace.
the problem is that I don't really have any blender files to test this export on. I just made a cube with an armature. If someone has something better to test, I wouldn't mind getting it going. or at least giving it a shot.
-tawn
tawnkramer@gmail.com
also, I don't think I can post the python script here without ruining the whitespace.
Hello, I got this script to work with CVS build of Blender 2.41, but unfortunately I have only 1 model to test it on. Could anybody test it, please?
Thank you,
Kostya.
http://www.geocities.com/kostyabkg/blender2cal3d_4.zip
Thank you,
Kostya.
http://www.geocities.com/kostyabkg/blender2cal3d_4.zip