KatsBits Community

[md3] Import error

0 Members and 1 Guest are viewing this topic.

Offline bookentire

  • Newbie
    • Posts: 9
administrator kat,
please help. i am new to blender and am having difficulty importing my first mesh.
Code: [Select]
Compiled with Python 2.6.2.
Checking for installed Python... got it!
Traceback (most recent call last):
File "(string)", line 1, in (module)
File "C:\Program Files (x86)\Blender\.blender\scripts\io\md3_import.py", line 45, in (module)
import md3
ImportError: No module named md3


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2694
    • KatsBits
Will need a bit more information on this.. What version of Blender and the MD3 scripts are you using? There are a couple out in the wilds. Also what's the model you're trying to import? You basically need to post more background details/explanation in terms of what you're trying to do to be able to properly answer you on this one.

Split this into it's own topic by the way, because it's about MD3 rather than ASE where you originally posted  ;)


Offline bookentire

  • Newbie
    • Posts: 9
TY for your reply,
i am using Blender 2.49b.
the scripts were acquired from: http://www.katsbits.com/files/md3/blender-md3.zip.
where is the version number on these scripts?
the ImportError happens immediately after selecting the Import\Quake3 (md3), Before selecting any model.

apologies for first posting this request in ASE.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2694
    • KatsBits
That's probably going to be a compatibility problem, the MD3 script was written for older versions of Blender 2.42, 2.43 or 2.45, you'll need to try loading those (plus the appropriate version of Python). Oh and... open the script into a text editor and you'll see the details at the top of the file.


Offline bookentire

  • Newbie
    • Posts: 9
kat,
i am now using Blender 2.43 with Python 2.4.msi.
the three MD3 files were placed in folder Blender Foundation\Blender\.blender\scripts\io.
the md3.py says it is: MD3_VERSION 15
do the md3_export.py and md3_import.py have version numbers also?

when selecting the Import\Quake3 (md3), Python now tells me this:
Code: [Select]
Compiled with Python version 2.4.
Checking for installed Python... got it!
Traceback (most recent call last):
File "(string)", line 45, in ?
ImportError: No module named md3


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2694
    • KatsBits
Hmm.. I just double checked the MD3 files, you'll need to try this using Blender 2.42 (and the appropriate python install) which is what that version of the script was originally written for. BTW, you can install multiple Blender/Python combinations so long as each is in it's own directory.


Offline bookentire

  • Newbie
    • Posts: 9
kat,
now i am using Blender 2.42.
this Blender does not have the same directory structure, So i made one: "Blender Foundation\Blender\.blender\scripts\io".
And placed the three MD3 files inside folder \io.
have i been placing the scripts in the wrong location all along?

when selecting the Import\Quake3 (md3), Python tells me this:
Code: [Select]
Compiled with Python version 2.4.
Checking for installed Python... got it!
Traceback (most recent call last):
File "(string)", line 45, in ?
ImportError: No module named md3


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2694
    • KatsBits
Yes that won't work, you can't 'invent' directory structures like that. Blenders script directory locations are explained here.

The easiest thing to try first is to load the script into the Text Editor and run it from there. Switch the main 3D view to the Text Editor (Shift+F11) and the "Open" the script by clicking the double headed arrow button (in between the "AB" and "Screen 12" buttons) then use Alt+P to run it and go through the import process.


Offline bookentire

  • Newbie
    • Posts: 9
kat,
the three MD3 scripts have been placed in "C:\Documents and Settings\Administrator\Application Data\Blender Foundation\Blender\.blender\scripts\".

after using Blender to open the file "md3_import.py", And using ALT+P to run, Python says this:
Code: [Select]
Compiled with Python version 2.4.
Checking for installed Python... got it!
Traceback (most recent call last):
File "C:\Documents and Settings\Administrator\Application Data\Blender Foundation\Blender\.blender\scripts\md3_import.py", line 45, in?
import md3
File "C:\Documents and Settings\Administrator\Application Data\Blender Foundation\Blender\.blender\scripts\md3.py", line 7, in?
import q_shared
ImportError: No module named q_shared



Offline bookentire

  • Newbie
    • Posts: 9
kat,
i have now set the variable:
"PYTHONPATH"
"C:\PYTHON24;C:\PYTHON24\DLLs;C:\PYTHON24\LIB;C:\PYTHON24\LIB\LIB-TK"
but am getting the same error.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2694
    • KatsBits
OK.. had to do a bit of checking on this one. Download the zip file again (use the link you posted above) and follow the instructions and place all the files in Blenders "scripts" folder (except the "readme.txt", that's not needed). Once you do that "File >> Import >> Quake 3 (.md3)" and "File >> Export >> Quake 3 (.md3)" should appear in the main File menu, just select "import" and browse to the file, select and follow the directions.

I tested this on my Kubelwagon MD3 and it imported OK; the mesh is untextured but the material paths *do* import, you just need to reassociate images and relative paths.



Offline bookentire

  • Newbie
    • Posts: 9
kat,
Blender 2.42 does not have this directory structure:
[drive]:\Program Files\Blender Foundation\Blender\.blender\scripts
instead the scripts folder is placed in:
C:\Documents and Settings\Administrator\Application Data\Blender Foundation\Blender\.blender\scripts\

when i placed your new files in this scripts folder and tried to import, Python gives me this:
Code: [Select]
Compiled with Python version 2.4.
Checking for installed Python... got it!
INFO Starting ...
INFO Importing MD3 model: C:\Documents and Settings\Administrator\Desktop\Projects\bird001.MD3
INFO Shader path name:  C:/Documents and Settings/Administrator/Desktop/Projects/bird001/
INFO Model name: bird001
Traceback (most recent call last):
File "(string)", line 405, in FileSelectorCallback
File "(string)", line 189, in Import
File "C:\Documents and Settings\Administrator\Application Data\Blender Foundation\Blender\.blender\scripts\md3.py", line 593, in Load
self.surfaces[i].Load(file, log)
File "C:\Documents and Settings\Administrator\Application Data\Blender Foundation\Blender\.blender\scripts\md3.py", line 304, in Load
self.shaders[i].Load(file)
File "C:\Documents and Settings\Administrator\Application Data\Blender Foundation\Blender\.blender\scripts\md3.py", line 201, in Load
self.name = asciiz(data[0])
File "C:\Documents and Settings\Administrator\Application Data\Blender Foundation\Blender\.blender\scripts\q_shared.py", line 29, in asciiz
while(ord(s[n]) !=0):
IndexError: string index out of range


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2694
    • KatsBits
Where have you got Blender installed to exactly? Try re-installing (after removal) and of the three option you have for "Specify User data Location" during set up (third or so screen in iirc), choose the second one ("Use Installation Direcory (ie. location chosen to install blender.exe)"). Once that's done try the scripts again (as per above).


Offline bookentire

  • Newbie
    • Posts: 9
kat,
after completing a full uninstall, The Blender 2.42 installer 'Choose Install Location' page will by default create the destination folder: "C:\Program Files (x86)\Blender Foundation\Blender"

on the 'Specify User Data Location' page, the second option: "Use Installation Directory (ie. location chosen to install blender.exe)" by default is selected.

installing this way has set up the scripts folder inside the installed directory, But Python is now giving me this slightly different error message.

Code: [Select]
Compiled with Python version 2.4.
Checking for installed Python... got it!
INFO Starting ...
INFO Importing MD3 model: C:\Documents and Settings\Administrator\Desktop\Projects\bird001.MD3
INFO Shader path name:  C:/Documents and Settings/Administrator/Desktop/Projects/bird001/
INFO Model name: bird001
Traceback (most recent call last):
File "(string)", line 405, in FileSelectorCallback
File "(string)", line 189, in Import
File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\md3.py", line 593, in Load
self.surfaces[i].Load(file, log)
File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\md3.py", line 304, in Load
self.shaders[i].Load(file)
File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\md3.py", line 201, in Load
self.name = asciiz(data[0])
File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\q_shared.py", line 29, in asciiz
while(ord(s[n]) !=0):
IndexError: string index out of range