Game Development Community

Blender 2.42?

by Alberto Ganesh Barbati · in Artist Corner · 07/27/2006 (4:01 am) · 22 replies

I saw that Blender 2.42 has some very new nice features, so I am planning to upgrade. Is there someone who is already using the DTS exporter with 2.42? Are there any issues? In case there are none, that's good news! Let's upgrade ;-) In the opposite case, I would like to know if there is any interest in the community to lobby in order to have those issues fixed. I am quite proficient in Python, so I'm offering to give help, in case.
Page «Previous 1 2
#1
07/27/2006 (5:05 am)
I heard about some problems expoting animations from Blender 2.42 with the current exporter version. What I do is to keep also the 2.4.1 version and use it to export.

There are mainly two programmers involved in this exporter, as far as I know, but feel free to contribute with wathever improvement you have in mind, everybody here will thank you so ;)
#2
07/27/2006 (6:38 pm)
There's a problem with 2.42 blender's python API. Joseph filed a bug report and a developer responded with a work around.

I just happened to apply the work around to my local copy and it appears to be working now, but it definitely hasn't been extensively tested. If you want, you can download my DtsShape_Blender.py and see if it works for you as well. Just save it over your DtsShape_Blender.py file in your scripts directory.

My brief testing showed the change working for both 2.41 and 2.42.

If you like, here's the patch info:
--- /home/zaz/blender/python/torque/DTSExporter_091/DtsShape_Blender.py 2006-03-22 20:45:00.000000000 -0600
+++ DtsShape_Blender.py 2006-07-27 20:25:07.000000000 -0500
@@ -798,6 +798,7 @@
                context.currentFrame(useFrame)
                # Update the scene's state.
                scene.update(1)
+               scene.makeCurrent()

                for armIdx in range(0, len(self.addedArmatures)):
                        arm = self.addedArmatures[armIdx][0]
@@ -971,6 +972,7 @@
                        context.currentFrame(useFrame)
                        # Update the scene's state.
                        scene.update(1)
+                       scene.makeCurrent()
                # For normal animations, loop through each node and reset it's transforms.
                # This avoids transforms carrying over from other animations.
                else:
@@ -1005,6 +1007,7 @@
                        context.currentFrame(int(frame*interpolateInc))
                        # Update the scene's state.
                        scene.update(1)
+                       scene.makeCurrent()
                        # loop through each armature
                        for armIdx in range(0, len(self.addedArmatures)):
                                arm = self.addedArmatures[armIdx][0]
@@ -1232,6 +1235,7 @@

                                # Update the ipo's current value
                                scene.update(1)
+                               scene.makeCurrent()

                                # Add the frame(s)
                                # TODO: ifl frame would be useful here, if blender had a "Frame" value :)
#3
07/28/2006 (5:28 pm)
Thanks Gustavo. Thanks a lot Todd for the fix. That's good news, if the problems found so far are related to animations, then I'm not worried as I currently don't use them. Il give v2.42 a try, then.
#4
08/08/2006 (11:51 am)
I just wanted to thank Todd. Your file has worked for me using Blender 2.42. I was getting a script error at first, but I was able to resolve that by doing the following (in WinXP):

1. Extract the entire DTS exporter folder into G:\Program Files\Blender Foundation\Blender\.blender\scripts.

(my blender is on my G: drive)

2. Open DtsShape_Blender.py (NOT the compiled version I had in the folder, the other one) in Jedit and deleted text. Copy and pasted text using the version Todd has linked above into the empty file. Saved file.

3. Ran "Install Scripts.js" located in the above scripts folder.

I've tested it on simple shapes and textures so far and it's worked great. Thank You Todd!!!!
#5
08/09/2006 (1:44 am)
You can just close Blender, overwrite the file in G:\Program Files\Blender Foundation\Blender\.blender\scripts with the modified one (or modify it in place) and restart Blender. It works without problems as the new script is precompiled on-the-fly by the python subsystem.
#6
08/10/2006 (3:21 pm)
Thanks Alberto. That would have been MUCH easier.

I think I went down too far into the dir the first time and copied over the file in my exporter folder instead-

G:\Program Files\Blender Foundation\Blender\.blender\scripts\Torque_Exporter_091RC5

Sorry about that. I've had the engine for a while, but am just really starting to get into it. The DTS exporter has been terrific in 2.41 and I sure didn't want to mess it up!
#7
08/11/2006 (7:15 am)
I have not been able to use the exporter with 2.42. It always comes up with an error. If I try to export the same .blend file in 2.41, it works.
#8
08/11/2006 (6:51 pm)
Niko:
Someone might be able to help you resolve your problem if you would explain/describe the error you are seeing and your working environment. Its very hard to help you without that information.
#9
08/11/2006 (6:54 pm)
Oh, and to the others thanking me for the fix ... You're welcome! :-)
#10
08/11/2006 (7:00 pm)
The export work with Blender 2.42, What is your error?
#11
08/11/2006 (7:28 pm)
See my "Vehicle Tutorial" thread about two threads down.
#12
08/28/2006 (6:22 pm)
I am having trouble getting the exporter to work and just incase I rolled back to blender 2.41.

OS: Windows XP Home
tool: DTSexporter90

Steps:

1. Extract the files to the C:\Program Files\Blender Foundation\blender\plug-in folder.
2. Run the Installer Script titled, "Install Scripts.js"
3. Load Blender 2.41
4. Create a simple square one is in the background by default and can be selected.
5. From the Title Bar Menu click to select the File bar
6. Drag the mouse down to Export and then to Torque Shape .DTS, click to select
7. Verify the output location in the General Tab
8. Click Export to complete.

After checking the save directory there is not file titled .DTS
There is a log file the claims to be the Torque DTS Export and a .blend file.

I am new with this but very eager to learn.
Any help is appreciated.

Thanks,
Tim Reed
#13
08/28/2006 (6:35 pm)
You dont say anything about texture, you must have a texture (png or jpeg with power of 2).
#14
08/29/2006 (3:16 am)
Thanks.
I am still running through the tutorials on blender.
#15
08/29/2006 (3:46 am)
@Tim: I strongly suggest that you use v0.91 of the exporter. Morever, be sure to read and understand the file readme.html which is included in the exporter distribution, as it contains important info. In particular, the scene needs to be created in a very special way in order to export correctly.
#16
08/29/2006 (4:53 am)
I've started the process of updated tutorials for Blender 2.42 and the new exporter.

See the "Temporary news" at the top of www.users.on.net/~symes/gamedev/videotuts/videotuts.html for a link the the first update showing how to use Blender 2.42 and Exporter 0.91 to export DTS objects and materials.
#17
09/10/2006 (11:24 am)
Wow, I am glad I found this update. I was racking my brain trying to figure out why my model was sitting in the default pose. Thanks for the fix.
#18
09/28/2006 (3:13 am)
I've got a serious issue.
I've just reinstalled Blender 2.42, Python 2.4.3.

When i export the object I only get the top level of LOD.

ie my shape structure:

Shape
Collision
Detail 250
Armature250
Mesh250
Detail 150
Mesh150 (with armature modifier to Armature250)
Detail 100
Mesh100 (with armature modifier to Armature250)
....etc

but the out put only creates the largest LOD (250) properly.
It's skinned properly, and with the above changes, it plays the animations. But all the other LODs are not made.
If I un-parent Detail 250, so Detail 150 is the highest, it exports with only the 150 mesh-with animations and proper skin.

I also tried restructuring the export by duplicating the armature to each mesh (and renaming them to Arm150..etc so the .002 extension is removed- exporter does NOT like the .00# on any meshs or objects/armatures -just FYI)
so it looks like:

Shape
Collision
Detail 250
Armature250
Mesh250
Detail 150
Armature150
Mesh150
Detail 100
Armature100
Mesh100
....etc

This change did not show a difference.
I have the object and will email the file if needed.
#19
09/28/2006 (3:50 am)
Shouldn't the name of the detail nodes be "Detail250", "Detail150", etc. without spaces?
#20
09/28/2006 (4:01 am)
Did not make a difference.
tried changing empties to non-spaced names:
Detail250
Detail150
..etc
Page «Previous 1 2