Archived

This topic is now archived and is closed to further replies.

Scourage

Blender MD2 import/export problem

Recommended Posts

Scourage    1198
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]

Share this post


Link to post
Share on other sites
yspotua    122
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.

Share this post


Link to post
Share on other sites
Scourage    1198
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...

Share this post


Link to post
Share on other sites