You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TigerKat 7b316f2386 The Blender add-on export/import menus now have an option for feet and meters.
Added the operation 'set_model_scale' to geo_edit.py . This intended for edit the scale of bone .geos .

Added '-s' option to geo_list.py to display the scale of models.
5 years ago
LICENSE Initial commit 5 years ago
README.md The Blender add-on export/import menus now have an option for feet and meters. 5 years ago
__init__.py The Blender add-on export/import menus now have an option for feet and meters. 5 years ago
bones.py Added Blender export support. 5 years ago
export_geo.py The Blender add-on export/import menus now have an option for feet and meters. 5 years ago
geo.py bugfix: Wasn't parsing AltPivotInfo correctly. 5 years ago
geo_edit.py The Blender add-on export/import menus now have an option for feet and meters. 5 years ago
geo_list.py The Blender add-on export/import menus now have an option for feet and meters. 5 years ago
geomesh.py Added Blender export support. 5 years ago
import_geo.py Added Blender export support. 5 years ago
polygrid.py Added Blender export support. 5 years ago
stl_dump.py Added geo_edit.py as a simple command line tool for modifying .geo files. 5 years ago
util.py Now rebuilds the PolyGrid data when writing a .geo file. 5 years ago
vec_math.py Now rebuilds the PolyGrid data when writing a .geo file. 5 years ago

README.md

geopy

Python tools for manipulating .geo files, and Blender add-on for exporting .geo files.

Blender Add-On

The Blender add-on allows you to export .geo files.

Installing the Add-On

  1. Download geopy-v0.1.zip
  2. In Blender open "User Preferences" then select the "Add-ons" tab.
  3. Click the "Install Add-on from File..." button and select the downloaded zip.
  4. Enable the add-on and click the "Save User Preferences" button.

Using the Add-On

  1. Select the meshes to export in object mode.
  2. From the menu select File->Export->"City of Heroes (Feet) (.geo)" (or "City of Heroes (Meters) (.geo)" if your meshes have been scaled in meters).
  3. Browse to the file you want to create and click "Export GEO".

Tools

These command line tools allow inspection and modification of .geo files.

geo.py

Contains the Geo class, which represents the contents of .geo files. Can be run to test the reading and writing functionality.

geo.py <infile.geo> [<outfile.geo>]

If only an input .geo file is specified, it will read the input and dump the contents of the .geo to the console.

If an output .geo file is specified, it will read the input .geo file, and write the contents to the output as a new .geo file.

stl_dump.py

Dumps the meshes of a .geo file to .stl files. Used for testing and validation, as .stl isn't useful for games.

stl_dump.py <file.geo>

Dumps all the meshes contained in <file.geo> to <geo_name>/<model_name.stl>. <geo_name> and <model_name> are read from the .geo.

geo_edit.py

A command line tool for modifying a .geo file

geo_edit.py <infile.geo> <outfile.geo> <operation> [<operation options> ...]

Operation Description
del_model <reg_ex> Deletes all models whose name contains the regular expression <reg_ex>.
geo_name <name> Change the .geo's name to <name>.
rename_model <old> <new> Rename a model from <old> to <new>.
rename_texture <old> <new> Rename a texture from <old> to <new>.
rescale_all <scale> Rescale all vertices in all models by multiplying them all by <scale> .
set_model_scale <model> <x> <y> <z> Set the scale properties of the given model (not the same as rescaling).
Multiple operations can be specified and performed in the same run.

Unless noted otherwise, model names and regular expressions are case sensitive.

geo_list.py

A command line tool for list the model name inside of 1 or more .geo files.

geo_list.py <file.geo> [<file.geo> ...]

The output format is: <geo_name> : <model_name>

Known Issues

  • Not all structures are handled (reflection quads)
  • Not all structures are regenerated when writing a .geo file. (Reductions)
  • Blender import of .geo files is currently a stub.