Category: Import Export
The addon allows to import and export m3 model files. M3 is the file format used by Starcraft 2.
The m3 file format does not only contain mesh and materail data, but also meta data like, Lights, Particle Systems, Projections, Forces, Rigid Bodies and many more. Since for example materials do not match Blender materials perfectly, the addon used a lot of custom collections to represent them, which can be edited via new panels in the Scene Properties Tab.
In order to simplify the editing of the meta data which has something like an "impact area", the addon uses bones with custom shapes in order to outline for example the spawn area of m3 particle systems.
Files of the m3addon:
- __init__.py: Defines all the UI and custom properties
- m3.py: Blender independent library for loading and saving m3 files.
- structure.xml: An XML file which describes the m3 file format. Used by m3.py
- m3import.py: Provides a method for importing m3 files into Blender
- m3export.py: Provides a method for expriting m3 friles from Blender
- shared.py: Place for code shared by __init__.py, m3import.py and m3export.py
- calculateTangents.py: Contains logic for calculating the tangents.
- README.md: Description of the m3addon with a feature list
Utility scripts contained in the m3addon:
- m3ToXml.py: Script to convert m3 to xml.
- xmlToM3.py: Script to convert xml files (in the format of m3ToXml.py) to the m3 file format
- transferAnimations.py: Merges the animations of one m3/m3a file into another m3 file.
- transferAnimationIds.py: Makes a m3a (contains animations for m3 files) compatible with an m3 file based on bone names.
- listOffsets.py: Lists the calcualted offsets of an m3 data structure defined in structures.xml