Still having Python errors


(Cujo31) #1

Ok gang… I am still having python errors…

I am currently using Python 2.01 and Blender 2.23… I am trying to use the OBJ and LWO import scripts from Jan walter’s page:

http://www.janw.gothere.uk.com/

I tried both suggestions that were made… adding Import Blender 210 as Blender at the beginniing of the script… and changing the script command:

getCurrentscene() to getCurrentScene()

I still keep getting the following error:

PYTHON SCRIPT ERROR:
Traceback (most recent call last):
File “C:\PROGRAM FILES\BLENDER\objimport.py”, line 164, in callback

File “C:\PROGRAM FILES\BLENDER\objimport.py”, line 106, in testObjImport
mesh = Blender.Mesh(“OBJ”)
AttributeError: getCurrentScene

Am I just using too new of a version of Blender??? What gives and what do I need to correct here? I am a COMPLETE newbie to python so you’ll have to really explain things here…thanks!

Cujo


(theeth) #2

change the line “import Blender” into “import Blender210 as Blender”

Martin


(acasto) #3

I’m not sure, but usually attribute error means that command or call or funtion (whatever you call it) is not in there (or it has changed)

Try using:

import Blender
print dir(Blender)

to print off what is under the Blender modules, then look for what you want, take Get for example. Then you would put:

import Blender
print dir(Blender.Get)

I think then if you wanted more and under this is something called doc, then you would go:

import Blender
print dir(Blender.Get.doc)

This process (although a pain) should give you a better idea of what is in the module.


(Cujo31) #4

Hey Theeth…

Ok… I think that worked for the OBJ import script… how do I change that permanently so I don’t have to change it everytime I use the script???

thanks theeth and guys for the assist on this :stuck_out_tongue:

Cujo!


(Eric) #5

just save the text :smiley:

ohh, ALT-s by the way


(theeth) #6

Shift-Alt-F works all the time while Alt-S might not work all the time.

Martin


(Cujo31) #7

Ok theeth, Eric…

I got yhe OBJ import working again sweetly! I tried the same fixe with the LWO import and this is what I get:

testLwoImport(“c:\unzipped\TRAVELPOD\TravelPod.lwo”)
“LightWave 3D Object File Format” found
numPoints: 20234
numFaces: 16656
import into Blender …
triangles and quads …
all other (general) polygons …

Then Blender crashes with a illegal error… any hints on this one???

Cujo