The locality is restricted to action or user-transform only. Or as it goes
in the code now: by setting a constraint local, it executes the constraint
before it calculates the influence of Action or user transforms.
ALso note that this works in Evil Eulerians. Meaning that when you only
want to copy the X,Y or Z compenent of a euler, it can give unpredictable
results when the other euler values are set, this because euler axis
rotations work on top of each other.
1) Target-less IK
If you add an IK constraint without a target set (no object or bone target),
it now can be grabbed and moved with IK, using its own Bone tip or root as
target itself. This way you can use IK for posing, without having the IK
executed while it animates or while a Pose is being solved for real IK.
After grabbing "Target-less IK", it applies the resulted motion in the
pose-channels, which then can be used to insert keypositions.
The Target-less IK bone can still be rotated without IK, also its chain
can be edited as usual.
UI: The CTRL+I menu gives this as an option too. In the 3D window it is
drawn with orangish color.
Note that IK is not resistant to non-uniform scaling yet.
2) Auto-IK
When the option "Automatic IK" is set, in Edit Buttons Armature Panel,
it creates automatic temporal Target-less IK for the Bone you grab or
translate.
The rules are:
- it only works when a single Bone is selected
- if the Bone is a root bone (no parent), it adds IK to the end of the
chain(s)
- otherwise it adds the IK to the active Bone
- the temporal IK chain only consists of connected Bones.
This method is still a bit experimental. Maybe it should become a special
grabbing option (like SHIFT+G in Pose Mode). It also only works OK for rigs
that fit for it well... when a rig already is fully setup with IK it can't
do much good. :)
Minor modifications to simplify the code in evaluate_constraint.
The "Stick" feature will need more work as it gives bad results when skipping frames, jumping around on the timeline and when going backward in time.
Suggestion: Would be nice if it could use the local space too, not just global space planes.
Best is to forget yesterday's commit and old docs. New docs are underway...
Here's how IK works now;
- IK chains can go all the way to the furthest parent Bone. Disregarding
the old option "IK to Parent" and disgregarding whether a Bone has an
offset to its parent (offsets now work for IK, so you can also make
T-bones).
- The old "IK to Parent" option now only does what it should do: it denotes
whether a Bone is directly connected to a Parent Bone, or not.
In the UI and in code this option is now called "Connected".
- You can also define yourself which Bone will become the "Root" for an IK
chain. This can be any Parent of the IK tip (where the IK constraint is).
By default it goes all the way, unless you set a value for the new IK
Constraint Panel option "Chain Lenght".
- "Tree IK" now is detected automatic, when multiple IK Roots are on the
same Bone, and when there's a branched structure.
Multiple IK's on a single chain (no branches) is still executed as usual,
doing the IK's sequentially.
- Note: Branched structures, with _partial_ overlapping IK chains, that don't
share the same Root will possibly disconnect branches.
- When you select a Bone with IK, it now draws a yellow dashed line to its
Root.
- The IK options "Location Weight" and "Rotation Weight" are relative,
in case there's a Tree IK structure. These weights cannot be set to
zero. To animate or disable IK Targets, use the "Influence" slider.
- This new IK is backwards and upwards compatible for Blender files.
Of course, the new features won't show in older Blender binaries! :)
Other changes & notes;
- In PoseMode, the Constraint Panel now also draws in Editing Buttons, next
to the Bones Panel.
- IK Constraint Panel was redesigned... it's still a bit squished
- Buttons "No X DoF" is now called "Lock X". This to follow convention to
name options positive.
- Added Undo push for Make/Clear Parent in Editmode Armature
- Use CTRL+P "Make Parent" on a single selected Bone to make it become
connected (ALT+P had already "Disconnect").
On todo next; Visualizing & review of Bone DoF limits and stiffness
- Removed old convention that only allowed one "IK" connection for Bones
in a joint. Was highly frustrating for editing trees or branches.
In a next commit, there will be a different method to define IK target
and IK root, so this option actually will become "Connect Bone" or so.
- the IK group name is gone, now is just an option "Tree IK". When IK
chains share a root they'll form a tree.
Todo is preventing conflicts here (will be for editor to define IK Root)
- Adding new IK constraint with CTRL+I activates Constraint
Full logs for changes will be added later. Worth to note now;
- support for 'tree IK' added
- DOF and stiffness per IK bone (in pose only)
- Orientation IK support (target rotates -> chain follows)
This is still WIP. Buttons might change, button ranges will change, and the
way 'IK groups' are working will change. You can play with this, but don't
expect saved files to work still by end of this day! :)
Main target was cleanup of editconstraint.c and removal of the ugly
ob->activecon (active constraint channel), which was set by the "Show"
button in the Constraint Panel.
Better is to introduce an 'Active Constraint' itself, which stores in
the Constraint itself. By using this setting, and by checking the active
Bone, the UI can update reliably now. This only shows now in IpoWindow
btw (for constraint ipos). The active Constraint is drawn in the Buttons
with a slightly brighter backdrop. Any action in that Panel selects a
constraint now (even click in backdrop).
So now we have pose channels & constraint channels nicely behaving. Now the
darn Action channels... :)
Further in this commit:
- interface.c: Button ROUNDBOX now does button callback too.
Button NUMSLI didn't do the callback on a click only
- Cleaned up include files in yafray, got annoyed it compiled over all the
time.
- removed unused variables from Constraint struct
- switched almost all uiDefBut(..., TOG|BIT|..) to use UiDefButBit and the
name of the actual bit define instead of just a magic constant, this makes
searching the code much nicer. most of the credit here goes to LetterRip
who did almost all of the conversions, I mostly just checked them over.
- Added option to the IK buttons, to have it use the 'tip' as end of the
IK chain. I never really understood this old convention (IK didn't work
on the Bone itself).
Old files still will read OK though. But I made the "To Tip" a default
when adding new IK constraints.
- Hotkey CTRL+I: add IK, with option to have it adding an Empty target,
or use a selected Bone as target. With the new non-modal PoseMode, it
gives instant access to playing with the IK chain.
- Hotkey ALT+I: clears IK, on all selected Bones
- Hotkey ALT+C: clears Constraints on all selected Bones (incl IK)
it used the 'global' (Pose Space) rotation to define the action timing.
That was of course hardly useful, reason for many weird patched rigs.
Nevertheless, sometimes it can be useful, and it's nice to see old files
nicely work still. So: "Local" is an option now.
Note: if you changed last week files because of the new action constraint,
set the new "Local" option in the object-buttons Constraint panel.
Aim was to get a total refresh of the animation system. This
is needed because;
- we need to upgrade it with 21st century features
- current code is spaghetti/hack combo, and hides good design
- it should become lag-free with using dependency graphs
A full log, with complete code API/structure/design explanation
will follow, that's a load of work... so here below the list with
hot changes;
- The entire object update system (matrices, geometry) is now
centralized. Calls to where_is_object and makeDispList are
forbidden, instead we tag objects 'changed' and let the
depgraph code sort it out
- Removed all old "Ika" code
- Depgraph is aware of all relationships, including meta balls,
constraints, bevelcurve, and so on.
- Made depgraph aware of relation types and layers, to do smart
flushing of 'changed' events. Nothing gets calculated too often!
- Transform uses depgraph to detect changes
- On frame-advance, depgraph flushes animated changes
Armatures;
Almost all armature related code has been fully built from scratch.
It now reveils the original design much better, with a very clean
implementation, lag free without even calculating each Bone more than
once. Result is quite a speedup yes!
Important to note is;
1) Armature is data containing the 'rest position'
2) Pose is the changes of rest position, and always on object level.
That way more Objects can use same Pose. Also constraints are in Pose
3) Actions only contain the Ipos to change values in Poses.
- Bones draw unrotated now
- Drawing bones speedup enormously (10-20 times)
- Bone selecting in EditMode, selection state is saved for PoseMode,
and vice-versa
- Undo in editmode
- Bone renaming does vertexgroups, constraints, posechannels, actions,
for all users of Armature in entire file
- Added Bone renaming in NKey panel
- Nkey PoseMode shows eulers now
- EditMode and PoseMode now have 'active' bone too (last clicked)
- Parenting in EditMode' CTRL+P, ALT+P, with nice options!
- Pose is added in Outliner now, with showing that constraints are in
the Pose, not Armature
- Disconnected IK solving from constraints. It's a separate phase now,
on top of the full Pose calculations
- Pose itself has a dependency graph too, so evaluation order is lag free.
TODO NOW;
- Rotating in Posemode has incorrect inverse transform (Martin will fix)
- Python Bone/Armature/Pose API disabled... needs full recode too
(wait for my doc!)
- Game engine will need upgrade too
- Depgraph code needs revision, cleanup, can be much faster!
(But, compliments for Jean-Luc, it works like a charm!)
- IK changed, it now doesnt use previous position to advance to next
position anymore. That system looks nice (no flips) but is not well
suited for NLA and background render.
TODO LATER;
We now can do loadsa new nifty features as well; like:
- Kill PoseMode (can be option for armatures itself)
- Make B-Bones (Bezier, Bspline, like for spines)
- Move all silly button level edit to 3d window (like CTRL+I = add
IK)
- Much better & informative drawing
- Fix action/nla editors
- Put all ipos in Actions (object, mesh key, lamp color)
- Add hooks
- Null bones
- Much more advanced constraints...
Bugfixes;
- OGL render (view3d header) had wrong first frame on anim render
- Ipo 'recording' mode had wrong playback speed
- Vertex-key mode now sticks to show 'active key', until frame change
-Ton-
Read today's meeting minutes for a description.
Bjornmose: We'll need some example and screenshots for the dev pages of blender3d.org. If you can do some, neat, if not, I'll do them.
Matt, Emilie and Chris: Please review UI addition. Pixel alignement and all that fun stuff has not be overly looked for (though I did some cleaning by adding alignment blocks).
[SCons] Build with Solid as default when enabling the gameengine in the build process
[SCons] Build solid and qhull from the extern directory and link statically against them
That was about it.
There are a few things that needs double checking:
* Makefiles
* Projectfiles
* All the other systems than Linux and Windows on which the build (with scons) has been successfully tested.
Fixed by checking the object type and changing the up and track axis accordingly.
Also added some comments in the DNA file (recompiling makedna because of comments is fun!)
This is a temporary fix, but a complete fix will require a rewrite of of some part of the where_is_object function, and that would take too much time before 2.31.
Axis options for TrackTo
LockTrack
FollowPath
Auto creation of TrackTo constraint from Ctrl-T (old track still an option)
Auto creation of FollowPath when parenting to path (Normal parent still an option)
Backward compatibility stuff to convert the per object axis settings to per constraint when a Track constraint is present.
Function to convert old track to constraint (commented out)
Revamped the constraints interface with Matt's work from tuhopuu and the stuff we were discussing earlier.
--------------------
For coders:
unique_constraint_name and *new_constraint_data moved to the kernel (constraint.c)
new Projf function in arithb gives the projection of a vector on another vector
add_new_constraint now takes a constraint type (int) parameter
add_constraint_to_object(bConstraint *con, Object *ob) to link a constraint to an object
add_constraint_to_client(bConstraint *con) to link constraint to current client (object or bone)
add_influence_key_to_constraint (bConstraint *con) to (eventually) add a keyframe to the influence IPO of a constraint
(adding)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
also the Makefile.in's were from previous patch adding
the system depend stuff to configure.ac
Kent
--
mein@cs.umn.edu