Author Topic: GlestTools (on github)  (Read 5031 times)

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
GlestTools (on github)
« on: 2 May 2011, 06:16:53 »
GlestTools are a set of Python scripts that allow you to pack mods, 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 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.)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: GlestTools (on github)
« Reply #1 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.
« Last Edit: 2 May 2011, 06:40:28 by Omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: GlestTools (on github)
« Reply #2 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

Psychedelic_hands

  • Guest
Re: GlestTools (on github)
« Reply #3 on: 2 May 2011, 07:12:28 »
These could come in handy later! Thanks!  :P

Python seems pretty interesting.

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: GlestTools (on github)
« Reply #4 on: 2 May 2011, 12:38:24 »
Numpy seems to have a problem:

(click to show/hide)
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

Loronal

  • Guest
Re: GlestTools (on github)
« Reply #5 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.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: GlestTools (on github)
« Reply #6 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")?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Loronal

  • Guest
Re: GlestTools (on github)
« Reply #7 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)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: GlestTools (on github)
« Reply #8 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".
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

RV_007

  • Initiate
  • Posts: 5
  • Glest Doom Attempt
    • View Profile
Re: GlestTools (on github)
« Reply #9 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?
« Last Edit: 21 April 2012, 10:43:08 by RV_007 »

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: GlestTools (on github)
« Reply #10 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

 

anything