Author Topic: New blender export script with direct .g3d export available!  (Read 4657 times)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Sorry I forgot to release it  a bit earlier  :-[.

more info here:
http://www.titusgames.de

Thanks a lot for this Yggdrasil!!!

Info from the header:
Code: [Select]
#INSTALLATION :
#       Copy this Script into your .blender\scripts directory.
#       if you want direct .g3d support unpack all needed glexemel files to this directory too:
#       LINUX:
#       In case of linux its only: xml2g and g3d.dtd ( included is a binary for linux32 bit).
#       The sourcecode can be found here:
#       http://www.glest.org/files/contrib/tools/glexemel-0.1a.zip
#       WINDOWS:
#       If you are using windows, all files from the "bin" directory from the
#       following zip files are needed:
#       http://www.glest.org/files/contrib/tools/glexemel_win32_0.1a.zip
#

Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

modman

  • Guest
Re: New blender export script with direct .g3d export available!
« Reply #1 on: 31 January 2009, 13:28:58 »
Fantastic!  I'll have to update the Blender download then.

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: New blender export script with direct .g3d export available!
« Reply #2 on: 31 January 2009, 19:29:45 »
I've been using this for a couple of months. I'm sure Yggrasil post a link to it in the original thread.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: New blender export script with direct .g3d export available!
« Reply #3 on: 1 February 2009, 00:29:42 »
Yes,that's right, its simply some kind of "official" release. Otherwise it will get lost some day.
And I think not everybody is using this yet ....
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

gameboy

  • Guest
Re: New blender export script with direct .g3d export available!
« Reply #4 on: 1 February 2009, 11:28:16 »
Yeah, I downloaded it too, I only copied the xml2g.exe and the g3d.dtd file in the direcrtory, I guess that I read the post on linux.

doomgamer

  • Guest
Re: New blender export script with direct .g3d export available!
« Reply #5 on: 28 March 2009, 04:30:47 »
go titi this makes this gamers life a lot easier

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: New blender export script with direct .g3d export available!
« Reply #6 on: 28 March 2009, 04:52:46 »
thx titi ;D
Egypt Remastered!

Proof: Owner of glest@mail.com

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: New blender export script with direct .g3d export available!
« Reply #7 on: 27 April 2009, 12:17:52 »
I think we have a bug in this script, anyone else can establish the problems?
Or is John.d.h simply the only one who creates models using windows ?

https://forum.megaglest.org/index.php?topic=3811.msg24831#msg24831
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: New blender export script with direct .g3d export available!
« Reply #8 on: 27 April 2009, 19:05:26 »
OK, looks like we have a problem.

I found this: 
os.path.normcase('/')  and I hope it works.

can anyone test it (in windows) please:

Edit your g3d_xml_exporter_v1.0.py ( the blender export script for glest )

and replace
textureName = textureName.split('/')[-1]  #get only the filename

with
textureName = textureName.split(os.path.normcase('/'))[-1]  #get only the filename

It works in linux, so what about windows?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: New blender export script with direct .g3d export available!
« Reply #9 on: 27 April 2009, 20:06:45 »
replace
textureName = textureName.split('/')[-1]  #get only the filename

with
textureName = textureName.split(os.path.normcase('/'))[-1]  #get only the filename

I'll have to try this. The original intention by whoever made the script was that the models texture should be in the same directory as the .blend file and that the relative paths button should be turned on. The script then reads the string in the texture/image value and strips out double slashes // before the file name.

EDIT: This works! Thanks Titi! Texture files no longer have to be in the same folder as the .blend and can be linked from anywhere on the computer. This should make things alot simpler new windows user.
« Last Edit: 27 April 2009, 20:19:02 by wciow »
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: New blender export script with direct .g3d export available!
« Reply #10 on: 28 April 2009, 19:16:41 »
ok, I uploaded a new version(1.1) with this fix.

http://www.titusgames.de
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: New blender export script with direct .g3d export available!
« Reply #11 on: 7 May 2009, 07:30:49 »
Oh damn!!!  :-[ :-[ :-[

The link on my website was wrong. You still downloaded the old g3d_xml_exporter_v1.0.zip with the bug...

Here is the correct link!( and its corrected on the website too)
http://www.titusgames.de/blender/g3d_xml_exporter_v1.1.zip

By the way, notice this post for a problem found in the importer:
https://forum.megaglest.org/index.php?topic=4327.0  ( Thanks John.d.h )
« Last Edit: 7 May 2009, 09:10:15 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: New blender export script with direct .g3d export available!
« Reply #12 on: 7 May 2009, 12:00:10 »
Hmm, I didn't have that problem with the export script. I think he might have had an older version of python.

Also I didn't realise the link was broken since I did the fix myself in IDLE  ;)
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0