Sponsored Adverts

Author Topic: [MD5] EXPORT script for Blender 2.6x (OPEN)  (Read 167085 times)

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2348
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #60 on: January 25, 2011, 10:01:11 AM »
OK, a fix came in via NB - cheers matey.
Download the fixed MD5 export script from the downloads page. Or open the script in a text editor and find line 848 or the below text;
Code: [Select]
WindowManager.add_fileselect(self)
Replace with;
Code: [Select]
WindowManager.fileselect_add(self)

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2348
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #61 on: January 25, 2011, 10:22:30 AM »
OK, a fix came in via NB - cheers matey.
Download the fixed MD5 export script from the downloads page. Or open the script in a text editor and find line 848 or the below text;
Code: [Select]
WindowManager.add_fileselect(self)
Replace with;
Code: [Select]
WindowManager.fileselect_add(self)

Offline mikshaw

  • Newbie
  • Posts: 14
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #62 on: April 01, 2011, 08:47:12 PM »
Blender 2.57 will be using Python 3.2, and will require another set of changes.

What I've gathered so far:
bl_addon_info is now bl_info
to_quat is now to_quaternion
3rd-party scripts are added to scripts/addons/ instead of scripts/io/
there is some difference in the register and unregister of addons

I've gotten Blender 2.57 to load the add-on into the menu, but there's no way I have the knowledge to make it work.



Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2348
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #63 on: April 01, 2011, 09:44:37 PM »
Oh not again! I knew they were going to do something like this when I saw that effing folder! I'm guessing this is going to be across the board right? ASE, MD3, MD5 (here) et-al? To be honest I think we're going to have to throw the scripts open to the community to fix up from here on in as the various authors have all gone MIA and I certainly don't know enough programming or scripting to know my donkey from my elbow. I really do wish Blender would find a formula and stick to it, changing things around each iteration doesn't help build a solid user-base. Sorry had to rant that one out there ;D

Oh, and... welcome by the way and thanks for posting the info lol!

Offline mikshaw

  • Newbie
  • Posts: 14
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #64 on: April 02, 2011, 12:52:20 AM »
I've started reading up on Python, but I'm sure it will be a while before I'm able to do anything useful with it.
Lua I can do, to a point, and Python doesn't look to be terribly different, so hoping it will be relatively easy to pick up.

I should mention that when I started using the exporter for Blender 2.5, the resulting md5mesh was missing a line (// meshes: meshname) that is necessary for proper placement of textures in Sauerbraten.  So I changed line 130 to look like this:
buf=buf + "mesh {\n\t// meshes: " + submesh.name + "\n"

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2348
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #65 on: April 02, 2011, 01:23:31 AM »
That change sounds like it's resulted from SB's content being exported originally using the older versions of the MD5 export scripts? I'd be reluctant to drop that into the general MD5 script and push those out if it is, it makes adoption by other parties problematic because of engine tech and code differences; over the years modders have taken the baseline files (from KatsBits), modified them, then served them up locally, which works well as a delivery system. Hmm that was a bit off topic!

GL learning Python

Offline mikshaw

  • Newbie
  • Posts: 14
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #66 on: April 02, 2011, 01:43:44 AM »
I would say you're probably right about that. I don't know much about the guts of file formats or anything like that...I just poke at things if something doesn't look right to me, and hope to find or create solutions, even though they usually tend to be kludges.

 I'd already posted my change on the sauerbraten forum for anyone who might find it useful, so if it helps someone there, good.  If it doesn't mean anything to anyone but me, that's fine too.  It at least helped me not have to manually edit the file after every export.

Thanks for the GL =o)

Offline mikshaw

  • Newbie
  • Posts: 14
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #67 on: April 03, 2011, 07:43:23 PM »
I think I might have actually fixed it...and I don't even Python! =o)
http://www.pasteall.org/20522/python

All the changed lines have been tagged with 'mikshaw'
and I commented out my Sauerbraten fix on 130.

This hasn't been thoroughly tested, particularly considering the conditionals that don't apply to my file might not work at all.  I just exported one animation and it works the same as the one from 2.56

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2348
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #68 on: April 03, 2011, 09:06:34 PM »
I'll test this on a couple of characters I've got and see what results I get - will use der_tons MD5 viewer for playback as I don't have anything with MD5 capability loaded atm.

Do we know *for definite* if the internal changes made to 2.57 that's forcing these updates is going to remain in place upon public release? They've done this several time before where something has had to be adjusted only to find it doesn't work because they changed something back or around on final version release.

Offline mikshaw

  • Newbie
  • Posts: 14
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #69 on: April 03, 2011, 11:42:07 PM »
Apparently I didn't need to break up that line at 737ish.  I got this at blenderartists:
Quote from: zeffii
the invert() function was modified, I'm a little dim on the precise reasons, but I think the early .invert() returned an inverted matrix, while the new .invert() modifies the parentposemat in place. now if you want to simply return an inverted matrix you do a .inverted()

So rather than separating the invert() function onto its own line, the original line can just be changed from invert() to inverted():
Code: [Select]
posebonemat = parentposemat.inverted() * posebonematThe result is, as far as I can tell, identical.

Offline mikshaw

  • Newbie
  • Posts: 14
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #70 on: April 05, 2011, 02:30:48 AM »
Don't know *for definite*, but i just tested it in the RC2 that was released today, and it still works.

One of these days I plan to test Lee Salzman's IQM exporter too (works in 2.56, probably broken in 2.57), but since I'm sticking with MD5 for my current project I'm not sure when that will be.

Offline motorsep

  • Jr. Member
  • *
  • Posts: 75
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #71 on: April 19, 2011, 11:50:29 PM »
Has anyone tried the exporter with Blender 2.57 ?

Offline mikshaw

  • Newbie
  • Posts: 14
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #72 on: April 21, 2011, 05:08:54 PM »
Yes, that's what this last page of posts has been about.  The pasteall link above points to an edited version of the 2.56 script which seems to work, although it's still not thoroughly tested (and the "posebonemat" optimization mentioned a couple posts back hasn't been changed in the pasteall link).  I've been puttering around with other projects lately and haven't gotten back to Blender.

Offline Optimonkey

  • Newbie
  • Posts: 1
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #73 on: May 05, 2011, 05:12:34 PM »
mikshaw - Thanks for fixing that!

I am new to blender and trying out 2.57 and couldn't get the script to run.

I took your script and installed it from the ..user preferences...add_ons and ... it Worked!!!!

I am primarily learning Blender to create some MD5s for my game - (coming from Modo and Zbrush neither of which have any Character animation.)

So this was a critical component I wanted to have working before investing significant time.

Thanks again for your work...

Now I am off to write some md5 loading code in my ios app  :-)


Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2348
Re: [MD5] EXPORT script for Blender 2.6x (OPEN)
« Reply #74 on: May 05, 2011, 06:33:56 PM »
Thanks for double checking mikshaws edits work in 2.57b. I just double checked as well and it works fine. I'll add the updated version to the tools page and amend the first post. Cheers guys.

[EDIT]File is now available on the tools page and the Installation and Usage instructions have been updated.

 

Sponsored Adverts
RSS Copyright © 2019 KatsBits™. All Rights Reserved. No part of this or associated properties shall be reproduced without prior consent. AdvertisePrivacy PolicyDMCA (about DMCA) • Copyright PolicyCopyright Contact Home Blog Support About Contact Site Search Site Map RSS feed Forum YouTube FaceBook LinkedIn Twitter Instagram IMVU