Game Development Community

A solution to the nightmare

by Charles B · in Artist Corner · 02/22/2005 (7:02 pm) · 7 replies

When I saw that you were using python for the blender plugin I immediately knew a nightmare was coming.

I've used python before and it's great only if you can control all the versions on the systems it will deploy on.

I've tried to get the plugin to work with python 2.3 and blender 2.36 and of course not working.

Is it possible to have the blender plugin code changed to use bmake and c ?

I think this would make life easier on users of the plugin since c code doesn't change and break compatibility as much as python does.

#1
02/23/2005 (5:48 am)
I have python 2.3 and blender 2.36 and it works fine. What kind of problems are you experiencing?
#2
02/23/2005 (6:19 am)
There are some minor things you have to fix before it will work correctly.

The header scripts have to be changed in order for it to work properly using the latest blender version. Check some of the other threads in this forum.

[EDIT]
In DTS_Plender.py:

n 'Torque DTS Exporter'
b 233
g 'Export'
s 'Export' export
s 'Configure' config
t 'Export to Torque (.dts) format.'

Change the block to read:

Name: 'Torque DTS Exporter'
Blender: 233
Group: 'Export'
Submenu: 'Export' export
Submenu: 'Configure' config
Tooltip: 'Export to Torque (.dts) format.'

BTW, I think python is the best code to use for something like this, it's easy to manage than other ways.
#3
02/24/2005 (10:06 am)
### Sean Beck:

I take a version of gus which has walking and attempt to configure the exporter to dts when bam:



'import site' failed; use -v for traceback
Traceback (most recent call last):
File "", line 37, in ?
File "/ccb2/blender-2.36-linux-glibc2.2.5-i386-static-1/./.blender/scripts/DTSPython/__init__.py", line 30, in ?
File "/ccb2/blender-2.36-linux-glibc2.2.5-i386-static-1/./.blender/scripts/DTSPython/Torque_Util.py", line 26, in ?
ImportError: /usr/lib/python2.3/lib-dynload/array.so: undefined symbol: PyUnicodeUCS2_FromUnicode
#4
02/24/2005 (10:07 am)
### Sean Beck:

one more thing just starting blender and trying to export after loading gus has same crash.
#5
02/24/2005 (4:27 pm)
You have mismatched versions of Python: probably you have 2.4 active on your Linux box, and is using a pre-compiled static Blender binary that includes a subset of the 2.3 interpreter, among other static libraries.

Check this thread for more info:

www.garagegames.com/mg/forums/result.thread.php?qt=26126

You can upgrade Python to 2.4 on your system, just make sure you recompile the Blender binary. Or you can install 2.3 alongside 2.4, and use the environment variables to make Blender use 2.3.

added: btw, if you are having trouble with the config files to recompile Blender just let me know what is the distro you use, I can email you the binary I compiled on my box. With some luck it will work for you as well, assuming we have compatible setups (glibc, python, etc.)
#6
06/15/2005 (12:41 am)
Trying to use the exporter with Blender 2.37. I have the Python 2.3 as well. I've opened the DTS_Blender.dy using the Blender editor. The correct header block is already in there. Got the Torque DTS exporter showing in Blender, but when trying to use it I'm getting an python error message and to check the console. So far I haven't touched any script except just installing it.
Being a newbie, I don't know really what needs to be changed or configed.

Please help

Thanks
#7
06/15/2005 (11:14 pm)
Got it to work!!!! Yes, finally.

This is for Windows XP. I have a new pc that doesn't require rebooting. For older pc, rebooting would probably be a good idea for some steps.


Step 1) Go to http://www.garagegames.com/mg/projects/tge/artist.php#DTS and download the python exporter scripts
a)unzip the file
b)Go into C:\Program Files\Blender Foundation\Blender\.blender (there is a dot before blender)\ scripts
c)Move or copy the entire contents of the downloaded python exporter scripts into the scripts directory in substep b
you should see the Torque Shape .dts in Blender's export list at this time
Step 2) Go to http://www.python.org/ and download Python2.3.5 (Python23)
Step 3) In Windows Explorer (or use search for python.exe), click on the python icon and in the shell type
>>> import sys
>>> print sys.path
you should see the path similar to 'C:\PYTHON23','C:\PYTHON23\DLLS','C:\PYTHON23\LIB','C:\PYTHON23\LIB\PLAT-WIN','C:\PYTHON23\LIB\LIB-TK'
Step 4) In Blender, do SHIFT F11 and go to the ADD NEW text option. type
import sys
print sys.path
then ALT+P
In the black shell, a python23 pathway should appear.
Step 5) (most important) rightclick on the MyComputer icon and select Properties, then select the Advanced Tab, then Press the Environmental Variables button. Below the System Variable Box, hit NEW.
In the Variable Name Box, type PYTHONPATH.
In the Variable Value Box, type the entire path like this
C:\PYTHON23;C:\PYTHON23\DLLS;C:\PYTHON23\LIB;C:\PYTHON23\LIB\PLAT-WIN;C:\PYTHON23\LIB\LIB-TK
click ok on everything
Step 6) Go back into Blender and test the Torque Shape .dts exporter. It should work now. It did for me!!! :- )