by Willi "mrwonko" Schinmeyer, now also featuring improvements from cagelight's fork!
To install, put all these files into Blender's /scripts/addons/ folder.
You'll get new operators which can also be called from the im-/export menu - one each for importing and exporting the new file types.
In order for GLM exporting to work the files needs to be setup correctly:
There's a new panel in the object tab of the properties editor. You can use it to set Ghoul 2 specific properties (and exported objects must in fact have them):
The Ghoul 2 model format has a couple of limitations, keep them in mind:
Jedi Academy imposes some further restrictions, for example:
File paths in glm files are relative to GameData/Base/ or GameData/YourMod/. Using the "Base Path" option you can define relative to which folder they should be interpreted. Can be left empty if the file's path includes /GameData/.
In order to create new animations for Jedi Academy you'll need the Skeleton first. Assuming you've unpacked the models, import GameData/Base/models/players/_humanoid/_humanoid.gla. In the settings select "skeleton changes: Jedi Academy _humanoid" to get a cleaner skeleton (more connected bones and some hierarchy changes, e.g. in the fingers, that make more sense).
If you've unpacked the models folder to a different path that does not contain GameData, fill out "Base Path" with what would usually be ".../GameData/Base/". This is not necessary for GLA import, but GLM needs it to find the textures and the references skeleton. (Importing a GLM also imports the matching GLA. You may want to import a complete model so you can better preview the animation, the options are mostly the same.)
If you want to base your animations off existing animations, you'll need to import those, too. First, figure out which frames you need - importing the whole _humanoid just does not work, don't try, it's too big. Select "animations: Range" and fill out "Start frame" and "number of frames" accordingly.
You should then have the skeleton, optionally animated, in Blender. Create your animation(s), then start the .gla export. The most important setting is "gla reference", which you should set to "models/players/_humanoid/_humanoid" to make sure the bone indices match up.
For the exporter to be able to find the reference gla, it needs to know the base path. If you're working in .../GameData/.../, the exporter should be able to figure it out, otherwise you'll need to fill out "Base Path". The gla's path is also saved within the .gla file, if you're saving it with a different filename than the one it'll eventually have, enter the final name in "gla name". (I don't think it's that important though.)