Commit Graph

434 Commits

Author SHA1 Message Date
e3d0508882 == Proxies + Bone Groups ==
Bone Groups are now always copied from the source armature. This does mean that it isn't possible to have 'local' bone groups as for constraints, but it is better than losing bone groups from the original.
2008-03-16 03:51:00 +00:00
7643d5acd5 Fix for bug #7845:
IK stretch lead to bone shaking a bit too quickly since making IK
scale independent, now does more strict clamping of stretch again.
2008-02-18 11:16:20 +00:00
798d8ebf26 == Warning/Bug Fix ==
Bone extension string was not long enough for new extensions .bot and .top. This was surely causing some stack memory to be overwritten...

Warning reported by JMS on french newsgroup.
2008-02-11 22:18:41 +00:00
Ken Hughes
232be3a2e8 Fix syntax error in earlier commit. 2008-01-28 05:20:42 +00:00
354e6b9c18 == Automatic Bone Extension Adder ==
Added three new tools to the WKEY menu for Armatures in EditMode/PoseMode. These add .* extensions to the names of selected bones based on their position in 3d-space on the axis considered by that tool.

The current naming schemes are based upon the extensions I normally apply. Some people may have slightly different preferences though.

There is one for:
* Left-Right names (along x-axis)
* Front-Back names (along y-axis)
* Top-Bottom names (along z-axis)
2008-01-28 00:53:54 +00:00
Chris Want
5e3cffc64a Patch to change license to GPL only, from GSR. 2008-01-07 19:13:47 +00:00
5e58f5d463 == Local Constraints for Proxies (Peach Request) ==
Proxy protected bones can now get local (per-file) constraints added to them, which will be preserved after a file load. This is necessary for adding constraints to proxy-protected bones for special purposes while animating (i.e.  adding CopyLocs to IK-hand controls to pick up an object). 

These must be added after any constraints from the proxy, as proxy constraints may come and go without warning. As such, the UI forbids this from happening by removing the relevant button.

I've also made UI-changes to show which constraints come from the proxy (the buttons to move the constraint up/down and delete it, are replace with two icons - a the proxy 'ghost' icon and a lock). Also, trying to change any settings of proxy-protected constraint will show an error.


Notes:
* Object constraints are still not playing nice with proxies yet. They didn't before this commit either...
2008-01-04 11:21:50 +00:00
a42e548e81 removed some more header files, made the game engine compile with removed header files, added includes to SConstruct files. 2008-01-01 19:20:49 +00:00
372ee054c0 Some notes for those who try to follow this :)
- first work on getting area/screen handling back
- added structure for where to put stuff, is still under
  review, wait a bit for docs?

Campbell is working on removing every bad level include from
sources, so we can safely rebuild the src/ directory.
2008-01-01 18:29:19 +00:00
58bf29e389 removed blenderdef.h, BIF_*, BDR_* and BSE_* header files (except for BIF_gl.h and BIF_glutil.h) 2008-01-01 18:16:10 +00:00
5c13e82140 Two transform tweaks:
* [Peach Request] AutoIK now respects axis locking (rotation locks).
- Temporary DOF-Locks are turned on for those bones that are part of an AutoIK chain while transforming. These locks get cleared after transforming.
- This works for all bones except the root bone of the chain, which doesn't seem to be able to be locked.

* Limit Location constraint can now optionally affect Translations too (i.e. NKEY panel values won't change). 
- LimitRot,LimitScale support (for their respective transforms) will be done at a later date
- This only works if the constraint is using World/Local space (the other spaces are not supported yet).
- I've added a temporary button in the LimitLoc panel to enable this option (it is disabled by default). This button will be properly assigned a place in that panel sometime.
2007-12-05 11:19:36 +00:00
36f7da7046 Tiny feature, but loadsa code, and big impact for the Blender riggers:
-> Constraint Influence Ipo now can be local, linked to constraint itself

You enable this in the IpoWindow header, with the Action icon to the left
of the Ipo Type menu. The button tooltips give the clue as well.

Tech note: the Ipo now can get directly linked to a constraint, and is
being called during regular pose constraint solving.
Actions (and drivers in actions) are being calculated *before* pose 
constraint solving. Result of actions then is written in bones, which
then solves the entire pose.
This means you can have a driver on both the constraint, as on the action
channel for the constraint! Not that I'm going to debug that easily :)

Additional fix: Joshua added a copy/paste IpoCurve feature, but he broke
the functionality to be able to paste in an empty ipo channel. That now
works again
2007-11-28 12:11:06 +00:00
00762be141 Patch #7779: Make the 'Hold' option work with NLA action modifiers
Patch by: Matt Ebb (broken)

Currently in Blender, NLA action modifiers can work in very wacky and mysterious ways.

If an action is being modified with a path deform, when it reaches the end of that strip, it will snap back to the original un-modified location, regardless of whether the strip 'Hold' option is on. It's very frustrating to work with, and causes all sorts of problems - if you use a path to make a character walk from point A to point B, you generally want him to stay at point B, and not jump somewhere completely different, just because the strip ended.

This patch fixes this behaviour, and makes it much more sensible and predictable. There is a chance that this will break old files that were reliant on the old broken behaviour though, but I think it's definitely worthwhile to fix this problem.

Check the demo file in Blender 2.45 vs one with this patch applied - you can see the difference in behaviour.

Demo File Link (attachment in original tracker post):
https://projects.blender.org/tracker/download.php/9/127/7779/4856/wheelsetup2.zip
2007-11-21 04:49:13 +00:00
1199744188 Revamp of multi modifier option!
- error fix: overall weight group value was used inverted
- added "Inv" button to make weight group work inverted
- added bigger, more clear Multi Modifier button
2007-11-19 18:00:48 +00:00
7accd3a662 Long outstanding feature request: "Multi Modifier"
This allows to mix between the result of 2 modifiers, with both
using the same input state. This is useful for having a mesh deform
and armature deform working together.

However! This functionality could have been presented better...
this is actually Node editor stuff!

Now it works by adding a "MM" button, next to the "overall vgroup"
option. If MM is pressed, the input of this modifier is the same as
the input of the previous modifier.
Only the armature modifier has this option now...
2007-11-16 15:46:59 +00:00
62f8e6fc23 Quick added feature: the "do not get scaling from parent bone" option.
It's next to the 'hinge' button, a small 'S'. No more space here... will
make it nicer inferface later. :)
Let's first see if this works as expected.
2007-11-09 14:58:55 +00:00
7294d19d66 Bugfix:
Issue with dual quaternion scaling + vertex group influence.
2007-11-08 18:02:15 +00:00
63c5dbe745 Bugfix:
B-bones didn't work well with non-uniform scaling applied to them.
The code to solve this is not too pretty, but don't know how to do
it simpler, and at least it makes that stretchy spine work.
2007-11-05 18:44:42 +00:00
7d70dd98d6 Bugfix:
Dual quaternions + armature modifier vgroup didn't work together correct.
2007-11-05 17:38:07 +00:00
c5d2be76d7 IK
==

Solving is now done independent of scale, by scaling the chain to have a
size of about 1.0. This solves some issues with small or big chains, and
also makes the IK stretch setting independent of scale. The latter breaks
backwards compatibility somewhat, but is an improvement over what it did
before.
2007-11-01 12:40:46 +00:00
20905354fc Bugfix: "exploding candy"
Missed a case where I converted set_constraint_target incorrectly. This resulted in mancandy "exploding" on loading proxy-linked mancandy files.
2007-10-30 05:22:46 +00:00
30be716fc8 Pole Target for IK
==================

This adds an extra target to the IK solver constraint to define the
roll of the IK chain.

http://www.blender.org/development/current-projects/changes-since-244/inverse-kinematics/

Also fixes a crashes using ctrl+I to set an IK constraint on a bone
due to the recent constraints refactor.
2007-10-24 14:58:31 +00:00
bf68055b93 Compiler warnings silencing - mostly uninitialised vars 2007-10-23 06:24:29 +00:00
6422a740c2 == Constraints System - Recode 2 ==
Once again, I've recoded the constraints system. This time, the goals were:
* To make it more future-proof by 'modernising' the coding style. The long functions filled with switch statements, have given way to function-pointers with smaller functions for specific purposes.
* To make it support constraints which use multiple targets more readily that it did. In the past, it was assumed that constraints could only have at most one target.

As a result, a lot of code has been shuffled around, and modified. Also, the subversion number has been bumped up.

Known issues:
* PyConstraints, which were the main motivation for supporting multiple-targets, are currently broken. There are some bimport() error that keeps causing problems. I've also temporarily removed the doDriver support, although it may return in another form soon. 
* Constraints BPy-API is currently has a few features which currently don't work yet
* Outliner currently only displays the names of the constraints instead of the fancy subtarget/target/constraint-name display it used to do. What gets displayed here needs further investigation, as the old way was certainly not that great (and is not compatible with the new system too)
2007-10-21 23:00:29 +00:00
e844ee5e54 Bugfix:
The roll of a B-Bone relative to a previous regular bone was not matched
correctly.
2007-10-17 17:53:59 +00:00
4f96108137 Fix for error in recent b-bone rest pose commit. 2007-10-10 23:36:58 +00:00
87b186e6e7 Make B-Bones not deform in rest position by default.
B-Bones already deformed the mesh in the armature rest position, which is
unconvenient. For backwards compatibility existing .blend files still have
a button for the old behavior enabled.

(peach feature request)
2007-10-10 09:00:47 +00:00
c4114780d4 Little code cleanup.
bsystem_time was being called with an extra variable, which was useless. Most of the places that called it, were passing NULL for that variable anyway.

I've also cleaned up that function a bit, but the underlying problems with that part of the code still exist (EVIL GLOBALS that are exported for frame_to_float), for mblur and fields rendering features. That remains for another time.
2007-08-05 09:21:29 +00:00
c0e0f4698f Quaternion Deform Interpolation
===============================

This is a new armature deform interpolation method using Dual Quaternions,
which reduces the artifacts of linear blend skinning:

http://www.blender.org/development/current-projects/changes-since-244/skinning/

Based on the paper and provided code:

Skinning with Dual Quaternions
Ladislav Kavan, Steven Collins, Jiri Zara, Carol O'Sullivan.
Symposium on Interactive 3D Graphics and Games, 2007.
2007-07-31 19:28:52 +00:00
8742899f5e Armature CrazySpace Improvement
===============================

An improved CrazySpace correction is now used for Armature modifiers that use
vertex groups, and that are the first enabled modifiers in the stack. This is
a a specific case, but also a common one.

http://www.blender.org/development/current-projects/changes-since-244/skinning/

Implementation Notes:

- The quaternion crazyspace correction is still used for modifiers other than
  the armature modifier.
- Modifiers can now provide a deform matrix per vertex to be used for
  crazyspace correction, only the armature modifier implements this now.
2007-07-28 21:04:30 +00:00
af55d208f4 == 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
2007-07-15 03:35:37 +00:00
b711bf185b Bugfix (reported on BA forums):
Blender crashed when the Armature Modifier was supplied with the name of a Vertex
Group which did not have any verts assigned to it.
2007-05-05 09:31:01 +00:00
afdd54fa37 moved source and text to american spelling
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
2007-04-04 13:18:41 +00:00
269e943d58 == Copy Location Constraint ==
I've added two new options for this constraint:
* Copy Bone Tip Location
* Apply owner's location on top of copied location ('Offset')
2007-03-24 03:00:54 +00:00
31f79cf5b4 === Constraints ===
Patch by Juho Vepsäläinen (bebraw)
[ #5850 ] Inverted axis' buttons to Copy Rotation and Copy Location constraints

This patch adds the options to invert the value being copied from each axis of the Copy Rot/Copy Loc constraints.


This commit also includes some slight code sanitization and tool tips cleanup (for the two track constraints, the tool tips were really unuseful).
2007-03-18 14:53:17 +00:00
e0c77c0f14 made all data adding functions accept a name such as add_mesh or add_curve, previously only some datatypes adding functions accepted a name.
also updated the Bpy.py epydocs
2007-03-11 16:25:17 +00:00
4d5bd6872b Bugfix #5833:
When rotating bones around the 3d-cursor in posemode with a rotated
armature, rotation was around strange points other than the cursor.

This bug has been around for quite a few releases now. Somehow, the
maths used to convert the world/global space locations to local locations
only worked on things in editmode, but not bones.
2007-02-05 01:28:14 +00:00
c45e057062 Plumiferos reported bug:
When weights in Meshes are extremely small (< 0.01) normalizing them
can give overflows, thanks to float precision limit.
This is still unsolved, but for now the limit had to be set smaller...
(reason is that Plumiferos uses mixed lattice and vertex-group deform)

Also: running Blender in debug (-d) will print subversion now.
2007-01-28 11:44:32 +00:00
a7ea449214 (Hopefully this commit is ok for current bcon status)
Moved function used for 'Visual' keyframing, to live with the rest of the
API calls I added for Pose-Mode bone snapping. Now, it is in a more
'releasable' state.
2007-01-17 05:53:44 +00:00
0b2b893cef Added some additional comments about the usage of the the backend
functions used for Pose-Mode bone snapping.
2007-01-07 22:30:44 +00:00
6c9b0288e5 Bugfix #5617
Armature deform bug: when values in weightgroups are extreme small but not
zero (like 10e-39) a division caused values to warp to infinity or beyond!
2007-01-06 12:33:01 +00:00
429ec5eea3 Bugfix #5212:
IK Locks/Limits were applied to bones in IK-chains even when the IK
constraint for the chain had an influence value of 0.

I've added a check to see if the ik-constraint found has any influence
over a chain, before the chain is made available for ik-solving.
2007-01-05 08:16:23 +00:00
fcd3ea7875 == Snap Bones To Location in PoseMode ==
Now the Snap To Location (Shift S) tools for bones in pose-mode
work correctly. Previously, only one of these tools was implemented,
but it only worked in some cases.


This fixes item #4874 in Todo Tracker. Was patch #5012.
2006-12-22 09:05:37 +00:00
dbbf45875b == Scaling Constraints Working in Local-Space ==
* Patch #5442: "Fix Bone SizeLimit" by Heriberto Mendez (gammarayq21)
'Limit Scale' constraint can now work on bone's local scaling too.

* I've also made the 'Copy Scale' constraint able to use the local scaling
of bones too.
2006-12-18 10:17:40 +00:00
4935f0b231 Constraints on bones working in 'local' mode, now obey the Enforce
value for constraints. Only Copy Rotation used to do so.

Note: only enforce values of 0.0 or 1.0 are useful/totally predictable
2006-12-14 22:58:22 +00:00
51ce503cb2 Armature Proxy bugfix: when adding constraints or bones, the proxy sync
didn't keep in mind the pose channels could change order...

Note the disabled code in readfile.c; will be finished later. It's for
debugging library dependencies.
2006-11-30 21:40:11 +00:00
342c900220 Proxy Objects revisited!
The first incarnation assumed that proxies were local objects per
definition. Unfortunately that makes it impossible to - for example -
reference-link an entire Scene with proxies, to be used as a special
character set.

This commit makes the proxy implementation also a bit more clear.

Related work: the scene-sets were not executed fully or correctly for
the dependency graph. That happens now (in 3d view) as well.
2006-11-30 15:54:21 +00:00
373b323934 VenomGFX report:
Using vertex group deform with Lattice, with no lattice 'deform verts'
created yet, Blender crashed.
2006-11-23 16:49:10 +00:00
efde6ecbc4 Fix for commit from Brecht:
2006/11/19 00:07:32 CET
Fix for bug #5250: inaccurate conversion between edit and pose mode bones.

Two very bad bugs:
- replacing atan() with atan2() should also remove the M_PI correction!
  This is the equivalent:
    angle=atan(x/y); if(y<0) angle+=M_PI;
    angle= atan2(x, y);

- the new NormalizedVecAngle2() call was negating an input vector, causing
  calling code to screw up. All arithb.c calls should not alter input.
2006-11-21 10:52:11 +00:00
823e71e757 RESCUE COMMIT!
Yesterday's commit from Brecht broke armature editmode, damaging armatures
in a way you cannot rescue. This rewinds the main changes. After commit
I'll try to find the error...
2006-11-21 09:26:59 +00:00