* Replaced magic numbers (3rd argument for memcpy functions) with sizeof(float)*2 just to be safe, in case some weirdo compiler out there doesn't like them.
* Made a few comments a bit more descriptive
* incorrect args to Draw.Create() would crash blender because it wasnt deallocating the value properly.
* deallocation of an uninitialized button could also try and free uninitialized memory if the type happened to be a STRING.
* removed the unused tooltip pointer from teh Draw.h's Button struct.
This commit adds a new constraint to Blender: the Transformation Constraint. This constraint gives you more freedom to choose how transforms are copied from one object/bone to another object/bone.
You can assign the Loc/Rot/Scale channels of a source to the Loc/Rot/Scale channels of a destination, specifying the range of motion (per axis) from the source to consider, and the range of motion (per axis) that will be applied to the destination. Also, for each destination axis, you can choose which of the source axes to copy from.
A similar constraint was coded by Jason Blary (snark), as Patch #4991. This constraint is basically rewritten from scratch, although there are some elements of the original patch which may be borrowed in future.
Various notes:
* PyAPI access has been coded.
* Space conversion is also enabled for this constraint.
* Also the useless get_constraint_col function has been removed
* Doing a rotation copy with a ratio that is not 1:1 doesn't always work correctly yet (like for the Copy Rotation constraint).
Added some missing undo pushes in editkey.c. Now when you add/delete
shapekeys, you can do undo and actually have it undo adding/deleting the
shade keys.
I've added checks which should prevent crashes in this case. Sometimes vertex_dupli__mapFunc is called with no_f being NULL, but no_s should not be NULL in those cases.
Note: Visual Studio projectfiles and other buildsystems need to add extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp to the project!
Trying to Clear Rotation of a armature bone while in Weight Painting mode didn't work anymore due to Bugfix #6486. Now it checks if ob==active_object and also if weightpainting is on.
* Removed obsolete comments from constraints code
* ChildOf constraint buttons: Set/Clear Inverse are now Set/Clear Offset. Hopefully that makes it a bit clearer for users.
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
-----
More improvements to boolean tools. The main change (although very little in
code) is changing fuzzy comparisons of floating point values. For testing, a
new define is added in intern/boolop/intern/BOP_MathUtils.h called
VAR_EPSILON, which enables better comparisons. This is turned on by default;
undefining it will revert to using the previous comparisons. The downside of
these new comparisons is a loss in speed, but the resulting meshes are more
likely to be manifold (although still not always).
The other changes include speed improvements based on profiling results and
fixes for the improper creation of triangular faces with only two vertices.
of the nodes, I realized I had strayed from the path of enlightened blending
by causing the math node to create an output the size of the larger of the
two inputs.
It has been corrected create the output the size of the
first image, and in its abscense the second image. In the event of
nether input containing image data the node does not function. I also
added some early out checks at the beginning of the function to speed it
up a tad in these cases and commented the code a bit more.
Basically move stuff out of filesel.c and into language.c and changes
when exactly it does the conversion. It was doing it when not needed for
some machines. It probably still needs work but its slowly getting better.
I also removed some commented out code.
Kent
ID Properties weren't being duplicated (by shift-D or any of the other
duplication functions). So now ID properties are duplicated in the
main copy_libblock function, which (as far as I can check) covers all
ID-contained ID properties.
I also updated the constraint system to copy pyconstraint ID properties
on shift-D.
This would probably be a good thing to add to the stable branch, btw.