victorfeitosa / quake-hexen2-mdl-export-import

Blender Quake and Hexen II MDL Import/Export
43 stars 11 forks source link

How do I pick animation frame when importing MDL into Blender ? #9

Closed motorsep closed 10 months ago

motorsep commented 10 months ago

It seems that this add-on imports first frame of MDL. Could you please add UI element to specify a particular animation frame to import ? Or perhaps the add-on should import whole set of frames and doesn't because it's a bug ?

victorfeitosa commented 10 months ago

It should import all frames, I'll have to double-check with the latest version of Blender though. Importing creates one vertex group for every animation frame. Quake models are vertex animated so we need to either create different groups, which is what we currently do, or make Blender move vertices to their correct position for each frame, which sounds more correct. The problem with the latter is that we could break compatibility for a few edge cases that make triangles disappear on certain frames of animation, but I can circumvent that limitation.

motorsep commented 10 months ago

@victorfeitosa Actually this is related to this bug https://github.com/victorfeitosa/quake-hexen2-mdl-export-import/issues/8

I see Shapekeys are there, but no Actions/NLA stuff.

victorfeitosa commented 10 months ago

Ok, so since Blender 4.0 there have been a few changes to the scripting API. I'll work through these changes asap at least for the most essential features. As for actions for animations and vertex translation in animation frames instead of shape keys that will be coming sometime in the future. I'll close the issue and update the status once things have been fixed.

victorfeitosa commented 10 months ago

@motorsep I have a quick patch live HERE. Export is still broken but I'll work on a fix for it soon. Now animation frames should be importing with no issues to the timeline. No actions yet and no auto vertex merging yet either. Those features will take longer to work through.

motorsep commented 10 months ago

Much appreciated @victorfeitosa I will test it asap!

motorsep commented 10 months ago

Alright, seems like it's working. Model plays anims, Actions are there. I haven't worked with ShapeKey anims before, so I am not exactly sure if anything is off or missing 😅