Ive been trying for over two hours now to “import” not “open” the Second LIfe Avatar mesh (located here —>) http://secondlife.com/community/avatar.php into blender by using various scripts. I just want to bake a clothing template onto the mesh for realistic lighting. I am no scripter, and I have no idea what im doing. Everytime i enter a particular script code thingy i get error msgs. For ex. I’m mainly entering this script code, which could basically be in chinese and have the same meaning to me (i can’t speak, read, or understand a lick of chinese)* :
import Blender
def import_obj(path):
Blender.Window.WaitCursor(1)
name = path.split(’\’)[-1].split(’/’)[-1]
mesh = Blender.NMesh.New( name ) # create a new mesh
parse the file
file = open(path, ‘r’)
for line in file.readlines():
words = line.split()
if len(words) == 0 or words[0].startswith(’#’):
pass
elif words[0] == ‘v’:
x, y, z = float(words[1]), float(words[2]), float(words[3])
mesh.verts.append(Blender.NMesh.Vert(x, y, z))
elif words[0] == ‘f’:
faceVertList = []
for faceIdx in words[1:]:
faceVert = mesh.verts[int(faceIdx)-1]
faceVertList.append(faceVert)
newFace = Blender.NMesh.Face(faceVertList)
mesh.addFace(newFace)
link the mesh to a new object
ob = Blender.Object.New(‘Mesh’, name) # Mesh must be spelled just this–it is a specific type
ob.link(mesh) # tell the object to use the mesh we just made
scn = Blender.Scene.GetCurrent()
for o in scn.getChildren():
o.sel = 0
scn.link(ob) # link the object to the current scene
ob.sel= 1
ob.Layers = scn.Layers
Blender.Window.WaitCursor(0)
Blender.Window.RedrawAll()
Blender.Window.FileSelector(import_obj, ‘Import’)
I am sooo sorry if i posted this in the wrong section, but i spent 20mins trying to find the “support” section with no luck. im so comp dumb these days…please if you could help. and explain things in the most simple form possible i would greatly appreciate it. I can’t find a step by step tut ANYWHERE on the web for importing objs into blender. myzip keeps unzipping them also, with no luck. please help

