Hello to all blender loader users
I’ve just made quite large constraint system refactoring. I made it because constraints were breaking the loading too often.
The computations might yet not be perfect, but I prefer to improve them with small steps rather than in one large.
If someone comes accross problems with loading models that has constraints please post here your blend file. The more examples I have the better.
And just a short summary of the changes if someone is interested:
Constraint type separated from constraint logic.
By constraint type I mean: bone constraint, node constraint, lamp constraint, armature constraint and light constraint.
By logic I mean the type of calculations: LocLimit, RotLimit, LocLike etc.
This shoud make the implementation more easy to develop since one computations are made for every kind of object they apply for.
Support added for Light and Camera constraints. (they use SpatialConstraint just like Meshes).
Armature constraint is now noticed …
… but not applied because the Skeleton class has no transform that could be constrained.
Noticing this constraint prevents loader from crashing when used applies constraint for an armature.
Animations are added for static objects whose constraints target the moving ones.
If you apply a constraint on an object without animation and it targets the object that moves, then blender automatically animates
the constrained object even if it has no traces. Such situation caused loader to crash so now the static objects are given animation
that simulates their constrained movement.
Take note that when you want get the result working for objects you will need to play all objects’ animations and not only the one that
has it applied in blender.
As I said above the computations might not yet be fully errorfree but this is not the point of these changes.
Submit any problems you get:)
I’ll now focus on bugfixing.