Changes for constraints system

Hey everyone,

yesterday I have commited a patch to blender importer constraints system :slight_smile: I won’t post it here because it is a lot of code so if anyone is interesed in code review please check the sources.
The main thing that changed is that the importer now simulates the whole animation of either spatial or skeleton and during that simulation constraints are applied and the positions are read and stored to a VirtualTrack. The VirtualTrack is later transformed into BoneTrack or Spatial track.
This implementation is much lighter than the previous one and has one huge advantage. It can create animation for features (bone or spatial) that did not have tracks in blender but their constraints made them to move during animation. The previous implementation tried to work out where to add tracks but it didn’t work well.

And one other thing. All space scopes are now supported: world space, local space, local with parent and pose space. :slight_smile:

There are only few constraint supported at the moment: loc limi, rot limit, scale limit, copy location, copy rotation, copy scale, null constraint and distance limit.
But I hope to be able to add IK constraint now. The implementation was designed to make it easier to add this one so I hope it will work :slight_smile:

The code is fresh so I know there will be bugs. If you find any please write to me and send me your model if you can.
But remember to apply all translations, rotations and scales to your animated model and its armature. The importer does not yet load everything correctly. I am still working on that.

Hope you will like how the constraint work and hope I will be able to add IK soon :slight_smile:



I’m really looking forward to IK constraints.

Cool, thanks! Great work :slight_smile: