Commit Graph

15 Commits

Author SHA1 Message Date
Ton Roosendaal ac619bace6 Third and last commit for Brecht's IK work.
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! :)
2005-08-27 12:48:45 +00:00
Ton Roosendaal dfb654ba60 Huge commit, but not much features... had to shuffle a lot of code around.
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
2005-08-24 20:18:03 +00:00
Daniel Dunbar b03a20d272 - got rid of silly #define ..._BIT, #define ... (1<<..._BIT) stuff
- 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.
2005-08-03 18:48:22 +00:00
Ton Roosendaal 4d273d8d5b Armature-Pose IK goodies!
- 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)
2005-07-24 11:36:05 +00:00
Ton Roosendaal 02ab203c98 Made action constraints to become backwards compatible. In the old version
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.
2005-07-18 17:27:17 +00:00
Ton Roosendaal 28a1e8277b Result of 2 weeks of quiet coding work in Greece :)
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-
2005-07-03 17:35:38 +00:00
Martin Poirier ae9347662b Stretch To constraint
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).
2004-09-05 20:21:16 +00:00
Jens Ole Wund bd768e00f3 claiming this to be mine .. to remain compatible to tuhopuu development
CONSTRAINT_TYPE_STRETCHTO	15
bjornmose
2004-08-26 22:00:14 +00:00
Nathan Letwory 00291b5cf4 [GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics.
[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.
2004-03-22 22:02:18 +00:00
Martin Poirier 7f90973344 Fix a problem that has been bugging me for a while. Tracking axis by default are different for Lamp and Camera than for the rest. For the constraint, it wasn't using the correct ones for them, so obviously, it didn't track correctly by default.
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!)
2004-01-01 19:21:06 +00:00
Martin Poirier baf23c7648 Fixed the lag with Follow Path and optimized constraint loops with Track To and Lock Track. I was plainly disabling the refresh of the target, but that caused a lag (3D window, not Render). Now, it raises a flag when it find a loop, so it only disables the refreshing when it needs to.
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.
2003-11-13 23:04:46 +00:00
Martin Poirier 4efdabfbbc Constraint stuff from tuhopuu including (but probably not limited too):
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
2003-10-21 13:22:07 +00:00
Kent Mein f1c4f705a1 Removed the config.h thing from the .h's in the source dir.
So we should be all set now :)

Kent
--
mein@cs.umn.edu
2002-12-27 13:11:01 +00:00
Kent Mein b9a19f1ea7 Did all of the .h's in source
(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
2002-11-25 11:16:17 +00:00
Hans Lambermont 12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00