Blender MD2 import/export problem

Started by
4 comments, last by Scourage 20 years, 3 months ago
I hope this is the right forum for this. I've written an MD2 import/export for blender. It's almost working , but not quite. What I'm trying to do is load each frame of animation into a frame in blender. But I can only seem to get the last frame of animation in all the frames, as if it overwriting the previous frames. Here's the code I use to update each frame:

	for i in xrange(0, md2.num_frames):
		Blender.Set('curframe', i)
		for j in xrange(0,md2.num_vertices):
			x=(md2.frames[i].scale[0]*md2.frames[i].vertices[j].vertices[0]+md2.frames[i].translate[0])*g_scale
			y=-(md2.frames[i].scale[1]*md2.frames[i].vertices[j].vertices[1]+md2.frames[i].translate[1])*g_scale
			z=(md2.frames[i].scale[2]*md2.frames[i].vertices[j].vertices[2]+md2.frames[i].translate[2])*g_scale

			#put the vertex in the right spot
			mesh.verts[j].co[0]=x
			mesh.verts[j].co[1]=y
			mesh.verts[j].co[2]=z

		mesh.update(1)
		mesh.insertKey(i,"absolute")

		print "Added Frame: ", i


Any suggestions would be appriciated. Thanks in advance Cheers, ---------------------------------- Halfway down the trail to hell... [edited by - scourage on January 7, 2004 7:42:24 AM]

[size="3"]Halfway down the trail to Hell...
Advertisement
A better place to post this would be the Python forums at www.elysiun.com.
I tried that before, but for whatever reason, I can''t get to that site. I keep getting a server timeout. Is the site down?

Cheers.


----------------------------------
Halfway down the trail to hell...

[size="3"]Halfway down the trail to Hell...
quote:Original post by Scourage
I tried that before, but for whatever reason, I can''t get to that site. I keep getting a server timeout. Is the site down?

Cheers.


----------------------------------
Halfway down the trail to hell...


It worked fine form me just a few seconds before this post. www.elysiun.com. That''s and N not an M.

Like the cheesy line, "it''s not you, it''s me"

Unfortunately, I''m in Korea for the time being and I just have trouble getting to certain websites through my ISP. Ever try calling tech support when they don''t speak your native language or you thiers. Thanks for your help on the website (I can get to it at work); however, nobody there has gotten back to me there.


Cheers






----------------------------------
Halfway down the trail to hell...

[size="3"]Halfway down the trail to Hell...
Updated the import script. I hung everything on a webpage so that as I develop stuff, it's all in one place.

Blender Page

Cheers.


----------------------------------
Halfway down the trail to hell...

[edited by - scourage on January 11, 2004 6:22:09 PM]

[size="3"]Halfway down the trail to Hell...

This topic is closed to new replies.

Advertisement