Get lattice points' positions at specific frame when animated by another object (through hook modifiers) I am currently developing an exporter for FFDs (Lattice).
I currently have support for FFDs animated through shape keys but now I have encountered a lattice whose points are driven by another object, rather than being animated itself, e.g. the lattice points’ positions are being driven by hooks (through the hook modifier). These hooks are defined as empty-objects, one for every point in the lattice that should be animated. And the empty-objects are animated by an Armature.
With this setup, how can I get the position of a specific lattice point at a specific frame in python?

So far I have found that I’m able to get the target object of a hook modifier through "lattice.modifiers[n].object".
Within the object I have also seen that the local and world matrices update with the animation. However I’m not sure how I would know which empty object affects which lattice point. I suppose the empty object’s position and the lattice point are supposed to be at the exact same position, but is that a guarantee? I have been trying to multiply a hook’s local position with its world matrix, but it doesn’t seem match the position I get when de-parenting it from the armature (which it should right?). I have seen that you are able to use "Assign" to assign the hook modifier to specific vertices in Edit Mode, but I don't know how to get this information.

Any comment that can get me in the right direction is greatly appreciated!

Thanks
Depending on how many hooks there are a (probably too tedious solution) would be to create a vertex group containing only that vertex for each hook. Then you can get those from script.
Selecting the vertices for a hook modifier has always been an enigma to me, which I don't like. 

If any of the hook modifiers has a strength &lt; 1, the method of using it's hook object's location will fail.

A fairly brute force solution can be found here: How do I get the deformed coordinate of a vertex with Python?
remember the vertices of a lattice are called points.

A Similarly brute force solution would be to copy your lattice, apply the modifiers, read the applied vert info and then delete the object again.

All those solutions are fairly ugly, but it's all I can come up with atm.

For meshes, bmesh offers a solution of copying the modifier's info to a temp mesh: https://blenderartists.org/t/get-vertices-coordinate-after-deformation/617992
Don't know if you can transfer that to a lattice.

Also: you don't have to multiply .matrix_world with anything. It gives you the absolute position (and loc/rot), no matter what parenting/constraints are influencing it.