They are written as normal string items, so anything using the plist later
on will need to know the context, but at least now there's no need to first
convert int or float data to strings before writing a plist.
One common use for a mesh having multiple UV maps is when combining several
mesh objects into one: the base UV map is the result of joining the meshes
(and will be a right mess of overlapping UV islands), but an additional UV
map is then setup as a copy of the first but with the islands re-packed so
nothing overlaps. The export script now searches for the active UV map and
uses that for both UV coordinates and the skin texture (when none is
specified).
If there's no export script, or the export script has no frame information,
animation data will be collected by running through blender frames 1 to the
current frame (inclusive). Each frame will be exported as a single frame
rather than as members of a frame group.
I'd forgotten I hadn't implemented exporting vertex normals. While I've
modified things for making better use of blender's tools and avoiding the
unnecessary use of objects, the code is taken from the ajmdl blender 2.4
export script.
Not sure if it actually works as the clients don't render the result
properly (can't see anything where the model should be), but the output
model does import back into blender properly.
Since qf does linear interpolation of verts, this seems to be reasonable.
Certaintly better than the rose-thorns I got because I haven't figured out
how to kick the auto-clamp.
I've decided to use property lists to define mdl control scripts. Some
names will probably get changed, and I still need to write code for writing
a plist, but the hard part is pretty much done :)
Note that this is the data block that holds the list of actual shape-keys,
rather than the shape-keys themselves. I'm not sure what it's correct name
is (it's just "Key" in RNA).
I really dislike this method of setting the name, but the use of "Key" as
the datablock name is actually hard-coded into blender's C code :/
Without fakeuser set, blender will toss out the actions on save and reload.
Converting to an nla strip might take care of that, but I haven't figured
out how to do that yet, so avoid any nasty surprised for the user.
Eye position, auto rotation, sync type and particle effects can now all be
edited in blender: both import and export do the right thing. The settings
can be found in the "QF MDL" panel of the "Object" tab of the properties
view.
The params are eye position, flags and synctype. Provision is made for
reading them from a text block on export, but nothing is done other than
retrieving the text block.
The biggest part of the speedup is reading from blender's image only once
(it seems that every read does so from GL rather than memory: ouch). Also,
cache the results for each color.