Jump to content
  • Advertisement

Archived

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

Scourage

Blender MD2 import/export problem

This topic is 5304 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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...

Share this post


Link to post
Share on other sites
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
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
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!