Commit Graph

30 Commits

Author SHA1 Message Date
Bill Currie 9d09d65d9a Clean up some export stuff
While it's not there yet, the eventual goal is to support multiple
models in the one blend file, so per-object settings is a requirement.
2019-08-20 16:52:43 +09:00
Bill Currie c14e5623ad Get the mdl frames script property working
Maybe late 2.78+, blender added the ability to use any ID type in
PointerProperty, which is just what I wanted for the frames script.
2019-08-16 22:34:45 +09:00
khreathor 008b5a4d2c Import/Export fixes after some Blender 2.8 API changes 2019-08-16 21:38:29 +09:00
khreathor 33d114c09e Set playback/animation range to start from frame 1 2019-08-16 21:38:29 +09:00
khreathor 3913febace MDL properties in object panel are back 2019-08-16 21:38:29 +09:00
khreathor 4f29f57e77 Proper node positioning after import 2019-08-16 21:38:29 +09:00
khreathor a13c382969 Skingroup images import order fix 2019-08-16 21:38:29 +09:00
khreathor 17e76149a1 Adjust playback range on import, to fit mdl's animation length 2019-08-16 21:38:29 +09:00
khreathor 66fe862a87 Import skingroups as separate materials with skins as textures 2019-08-16 21:38:29 +09:00
khreathor ae86790e6c Initial Blender 2.8 changes - it works, now it's time for improvements 2019-08-16 21:38:29 +09:00
Bill Currie 971e689d3d Fix a slew of whitespace issues. 2012-08-07 13:25:44 +09:00
Bill Currie a3c8209bdf Handle missing frame information a little more usefully.
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.
2012-08-07 13:23:19 +09:00
Bill Currie c2712e6373 Track recent api change in svn blender.
Bah, I'm looking forward to the bmesh api stabilizing.
2012-04-24 11:04:45 +09:00
Bill Currie 99c58cca73 Make exporting md16 files possible.
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.
2012-04-23 08:54:19 +09:00
Bill Currie cdc57a0473 Set the skin images' fakeuser flag.
Until I figure out how to do animated skins in blender...
2012-04-19 22:16:30 +09:00
Bill Currie 6bae99d66c Create an animation script for imported models.
The animation script is just a plist of relevant frame and skin
information. Documentation is included in the generated script.
2012-04-19 22:06:43 +09:00
Bill Currie ff05074e70 Set the fcurve interpolation to linear.
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.
2012-04-19 18:49:53 +09:00
Bill Currie 196f2da585 Remove the fallback for missing image pack support.
It's been in blender since 2.59 or so.
2012-04-17 13:10:21 +09:00
Bill Currie e25024c131 Build a single NLA track with strips for all actions.
This removes the need for fakeuser :).

Anyway, with this, the model's animations can be viewed all in sequence
just by hitting alt-a.
2012-04-16 15:42:49 +09:00
Bill Currie 4b29510bfd Set the name of the shape-key datablock to the model name.
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 :/
2012-04-16 13:33:45 +09:00
Bill Currie 0952e918dd Set fakeuser on actions.
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.
2012-04-16 13:30:58 +09:00
Bill Currie 70f500a087 Use custom properties for model flags etc.
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.
2012-04-15 21:55:23 +09:00
Bill Currie fd9b8f7b4a Fix import and export for blender 2.63
Blender 2.63 should be out in a few days. Nice to get this ready ahead of
time.
2012-04-15 09:34:53 +09:00
Bill Currie ab4aec47a7 Correct vertex scaling for blender 2.62+
This also abandons support for older versions of blender.
2012-04-14 18:10:25 +09:00
Bill Currie 1f3eaaf2e0 Fix the importer for blender 2.61.
The use_image field of faces disappeared somewhere between 2.59 and 2.61.
2012-01-23 23:10:25 +09:00
Bill Currie 3b8ab404a0 Add the ability to save the extra model parameters.
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.
2011-09-28 07:41:20 +09:00
Bill Currie 3b33d8dade Make the basis shape key active on import.
Blender must have an active shape key before shape key animation will work.
This fixes the models being locked to the first frame until a shape key is
selected via the UI.
2011-09-24 11:43:06 +09:00
Bill Currie bd840726c2 Fix the mangled faces.
I /did/ see the warning about vertex index 0 in the obj importer script,
but I didn't take it seriously enough. This fixes both the twisted texture
on a couple of faces, and the truly mangled tris when exporting (using
invisibl.mdl for testing).
2011-09-24 09:00:14 +09:00
Bill Currie e35dd29a2d Don't use Vector in mdl.py
This will make testing of the MDL class a little easier (independent of
Blender).
2011-09-22 11:43:57 +09:00
Bill Currie 57aa19bd44 Rename qfmdl to io_mesh_qfmdl.
This fits in better with the blender addon naming scheme.
2011-09-21 20:18:23 +09:00
Renamed from tools/qfmdl/import_mdl.py (Browse further)