MegaGlest Forum

Modding and game content creation => Tools => Topic started by: will on 2 May 2011, 06:16:53

Title: GlestTools (on github)
Post by: will on 2 May 2011, 06:16:53
GlestTools (https://github.com/williame/GlestTools) are a set of Python scripts that allow you to pack mods (https://forum.megaglest.org/index.php?topic=6207.0), make animated thumbnails from G3D animations and much more!

Installation

On Windows:

On Ubuntu:
Code: [Select]
sudo apt-get install python-numpy python-imaging python-opengl
You then of course download GlestTools (https://github.com/williame/GlestTools/zipball/master) and unpack it somewhere on your hard-disk.

(Please give feedback on the accuracy of these instructions; they are from memory)

Generating thumbs for your models

From a commandline, you type:

Code: [Select]
cd [path-to-where-you-installed-the-script]
python g3d_thumb.py [path-to-g3d-model]

You can also give it the path to a folder, in which case it will generate thumbs for all G3D files found in that folder or any sub-folders!

Generating webpages with thumbs of all your models

Code: [Select]
cd [path-to-where-you-installed-the-script]
python techtree.html.py [path-to-techtree-folder] {optional_suffix}

This will create an html file with the name of your techtree, with a table for each faction, with a list of their unit animations.  It creates thumbnails for you.

(The suffix is an optional thing; if you are generating several sets of pages with similar names you can specify something to add to all the file names to ensure they don't clash.  If you don't have this problem, then ignore this option.)
Title: Re: GlestTools (on github)
Post by: Omega on 2 May 2011, 06:37:15
Because the package page was so darn long, here's the links to the three packages:

PyOpenGL: http://pypi.python.org/pypi/PyOpenGL/3.0.1

PIL: http://pypi.python.org/pypi/PIL/1.1.6

Numpy: http://pypi.python.org/pypi/numpy/1.5.1

Also, can you expand that post so there's more instructions, in particular, the packaging.
Title: Re: GlestTools (on github)
Post by: John.d.h on 2 May 2011, 06:41:27
Nice.  I'm just not quite sure what to use them for just yet (except the packing script).

As far as unit xml goes, this is what I was talking about earlier: https://forum.megaglest.org/index.php?topic=6400
Title: Re: GlestTools (on github)
Post by: Psychedelic_hands on 2 May 2011, 07:12:28
These could come in handy later! Thanks!  :P

Python seems pretty interesting.
Title: Re: GlestTools (on github)
Post by: wciow on 2 May 2011, 12:38:24
Numpy seems to have a problem:

(click to show/hide)
Title: Re: GlestTools (on github)
Post by: Loronal on 6 June 2011, 22:50:57
I sound like a noob but on windows what console do I use. CMD doesn't recognize python as a command and python console won't work.
Title: Re: GlestTools (on github)
Post by: Omega on 6 June 2011, 23:03:57
I sound like a noob but on windows what console do I use. CMD doesn't recognize python as a command and python console won't work.
Should be the python console... Why doesn't it work? Is it the executable located at: "C:\Python*\Python.exe" (where * is the version number with no period, eg, 2.5 will be "25")?
Title: Re: GlestTools (on github)
Post by: Loronal on 9 June 2011, 20:27:57
I've gotten it to work, but I can't really manage to use any commands. I type in cd :/glest (glest being the script directory and nothing happens)
Title: Re: GlestTools (on github)
Post by: Omega on 9 June 2011, 22:29:03
I've gotten it to work, but I can't really manage to use any commands. I type in cd :/glest (glest being the script directory and nothing happens)
That's a rather odd command... cd is a basic windows command, "change directory", and can either give a path based on the current folder (relative) or including the drive (absolute). However, your command is not legit for either. If it is meant to be an absolute path, you must start with a drive letter, eg: "C:/Glest", while relative should use the reverse type of slash ("/"), eg: "glest".
Title: Re: GlestTools (on github)
Post by: RV_007 on 21 April 2012, 09:51:53
Help, I tried to make animated thumbnails out of .g3d models (different angles included), but I can't make out of the commands or something. This is true for "python g3d_thumb.py "D:\...[path-to-g3d-model]". Are the file formats supposed to be .g3d (I got .megagle)? Can someone make a image tutorial so I can easy follow?
Title: Re: GlestTools (on github)
Post by: will on 2 October 2012, 05:49:00
Hi RV_007

what happens at the Windows command prompt when you type the command 'python'?

Can you paste the output here so I can see it?

thx
Will