Blender Git Commit Log
Git Commits -> Revision af55d20
Revision af55d20 by Joshua Leung (master) July 15, 2007, 03:35 (GMT) |
== Constraints System == After just over a week of coding, I've finished doing a major refactor/cleanup of the constraints code. In the process, quite a few old kludges and ugly hacks have been removed. Also, some new features which will greatly benefit riggers have been implemented. === What's New === * The long-awaited ``ChildOf Constraint'': This allows you to animate parent influences, and choose which transformation channels the parent affects the child on (i.e. no translation/rotation/scaling). It should be noted that disabling some combinations may not totally work as expected. Also, the 'Set Inverse' and 'Clear Inverse' buttons at the bottom of this constraint's panel set/clear the inverse correction for the parent's effects. Use these to make the owner not stick/be glued to the parent. * Constraint/Target Evaluation Spaces: In some constraints, there are now 1-2 combo boxes at the bottom of their panel, which allows you to pick which `co-ordinate space' they are evaluated in. This is much more flexible than the old 'local' options for bones only were. * Action Constraint - Loc/Rot/Size Inputs The Action Constraint can finally use the target's location/rotation/scaling transforms as input, to control the owner of the constraint. This should work much more reliably than it used to. The target evaluation should now also be more accurate due to the new space conversion stuff. * Transform - No longer in Crazy Space (TM) Transforming objects/bones with constraints applied should no longer occur in Crazy Space. They are now correctly inverse-corrected. This also applies to old-style object tracking. === General Code Changes === * solve_constraints is now in constraints.c. I've removed the old `blend consecutive constraints of same type' junk, which made the code more complex than it needed to be. * evaluate_constraint is now only passed the constraint, and two matrices. A few unused variables have been removed from here. * A tempolary struct, bConstraintOb, is now passed to solve_constraints instead of relying on an ugly, static workobject in some cases. This works much better. * Made the formatting of constraint code consistent * There's a version patch for older files so that constraint settings are correctly converted to the new system. This is currently done for MajorVersion <= 244, and SubVersion < 3. I've bumped up the subversion to 3 for this purpose. However, with the imminent 2.45 release, this may need to be adjusted accordingly. * LocEulSizeToMat4 and LocQuatSizeToMat4 now work in the order Size, Rot, Location. I've also added a few other math functions. * Mat4BlendMat4 is now in arithb. I've modified it's method slightly, to use other arithb functions, instead of its crazy blending scheme. * Moved some of the RigidBodyJoint constraint's code out of blenkernel, and into src. It shouldn't be setting its target in its data initialisation function based + accessing scene stuff where it was doing so. === Future Work === * Geometry to act as targets for constraints. A space has been reserved for this already. * Tidy up UI buttons of constraints |
Commit Details:
Full Hash: af55d208f48017872e30faa76a66d777c983106d
SVN Revision: 11273
Parent Commit: 0f692d9
Lines Changed: +1721, -1421
23 Modified Paths:
/source/blender/blenkernel/bad_level_call_stubs/stubs.c (+1, -1) (Diff)
/source/blender/blenkernel/BKE_blender.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_constraint.h (+38, -15) (Diff)
/source/blender/blenkernel/BKE_object.h (+0, -1) (Diff)
/source/blender/blenkernel/intern/action.c (+5, -3) (Diff)
/source/blender/blenkernel/intern/armature.c (+20, -252) (Diff)
/source/blender/blenkernel/intern/constraint.c (+868, -568) (Diff)
/source/blender/blenkernel/intern/object.c (+22, -116) (Diff)
/source/blender/blenlib/BLI_arithb.h (+2, -0) (Diff)
/source/blender/blenlib/intern/arithb.c (+56, -51) (Diff)
/source/blender/blenloader/intern/readfile.c (+120, -35) (Diff)
/source/blender/blenloader/intern/writefile.c (+5, -1) (Diff)
/source/blender/makesdna/DNA_action_types.h (+1, -0) (Diff)
/source/blender/makesdna/DNA_constraint_types.h (+100, -70) (Diff)
/source/blender/makesdna/DNA_object_types.h (+2, -1) (Diff)
/source/blender/python/api2_2x/Constraint.c (+115, -77) (Diff)
/source/blender/python/BPY_extern.h (+1, -1) (Diff)
/source/blender/python/BPY_interface.c (+3, -3) (Diff)
/source/blender/src/buttons_object.c (+299, -158) (Diff)
/source/blender/src/drawobject.c (+2, -2) (Diff)
/source/blender/src/editconstraint.c (+43, -30) (Diff)
/source/blender/src/editobject.c (+3, -3) (Diff)
/source/blender/src/transform_conversions.c (+14, -32) (Diff)
/source/blender/blenkernel/BKE_blender.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_constraint.h (+38, -15) (Diff)
/source/blender/blenkernel/BKE_object.h (+0, -1) (Diff)
/source/blender/blenkernel/intern/action.c (+5, -3) (Diff)
/source/blender/blenkernel/intern/armature.c (+20, -252) (Diff)
/source/blender/blenkernel/intern/constraint.c (+868, -568) (Diff)
/source/blender/blenkernel/intern/object.c (+22, -116) (Diff)
/source/blender/blenlib/BLI_arithb.h (+2, -0) (Diff)
/source/blender/blenlib/intern/arithb.c (+56, -51) (Diff)
/source/blender/blenloader/intern/readfile.c (+120, -35) (Diff)
/source/blender/blenloader/intern/writefile.c (+5, -1) (Diff)
/source/blender/makesdna/DNA_action_types.h (+1, -0) (Diff)
/source/blender/makesdna/DNA_constraint_types.h (+100, -70) (Diff)
/source/blender/makesdna/DNA_object_types.h (+2, -1) (Diff)
/source/blender/python/api2_2x/Constraint.c (+115, -77) (Diff)
/source/blender/python/BPY_extern.h (+1, -1) (Diff)
/source/blender/python/BPY_interface.c (+3, -3) (Diff)
/source/blender/src/buttons_object.c (+299, -158) (Diff)
/source/blender/src/drawobject.c (+2, -2) (Diff)
/source/blender/src/editconstraint.c (+43, -30) (Diff)
/source/blender/src/editobject.c (+3, -3) (Diff)
/source/blender/src/transform_conversions.c (+14, -32) (Diff)