Commit Graph

8625 Commits

Author SHA1 Message Date
ddbd9182d4 Forgot to commit file in the game engine. 2007-07-28 21:35:32 +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
337a1e53a9 Fix for wrong capitalization in #include. 2007-07-28 14:51:22 +00:00
373f91c8b1 Bone Heat Weighting
===================

This is a new automatic vertex weighting method, next to the existing
envelope based method. The details are here:

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

This is based on section 4 of the paper:

"Automatic Rigging and Animation of 3D Characters"
Ilya Baran and Jovan Popovic, SIGGRAPH 2007

Implementation Notes:

- Generic code for making mesh laplacian matrices has been added, which
  is only used by bone heat weighting at the moment.
- Bone to vertex visibility checking is done with the raytracing code.
- Fixed an issue in the subsurf limit calculation function, where the
  position of vertices on boundary edges was wrong. It is still not the
  correct position, but at least it's in the neighbourhood now.
2007-07-28 14:04:02 +00:00
e765fbf126 == Constraints - Important Bugfix ==
At last, the 'Local' option for Armatures works properly! 
Tonight I went through carefully and cross-checked the code once again, and found several bad mistakes I had made. These were:
* the value of one variable from the armatures code was not what I expected it to be, based off the name). 
* Mat4MulSerie swaps the first two args! Grrr...

Note: 
There's only one rig that I've tested that was broken. That was slikdigit's "mancandy", and the part in question was the jaw. It is likely that a few more rigs out there (in particular, their 'local' action constraints) relied on the wacky rotation values that used to be used, so are now broken.
2007-07-28 10:44:03 +00:00
48b07b7f15 Draw.py - typo
sceneSequence.h - bad type check, dosnt matter really since that define isnt used yet.
SurfNurb.c - was using lib hashing function and surfNurbs not a lib! (own mistake)
buttons_editing.c - Curves PathLen button was MAXFRAMEF and pathlen is a short so the button wrapped around.
2007-07-28 09:26:53 +00:00
f8544eefad A few little code cleanups for constraints code. I've just removed some lines that weren't needed. 2007-07-28 09:00:15 +00:00
34e4388a5c Previous bugfix for shadows cast on objects with diffuse reflectivity set to 0
caused errors on only shadow lamps; fixed this by adding back in the original 
intensity > 0.0 check in the only shadow if statement, where it belonged in the
first place.

In addition, the specular pass was not correctly affected by only shadow lamps,
severely reducing the usefulness of this feature.  For example, using four
spotlamps to create an omnidirectional buffered shadow lamp didn't work.
2007-07-27 21:54:01 +00:00
Ken Hughes
c3457718a4 Remove spurious ";" in declaration, which causes warning in gcc and MSVC. Thanks Levi for catching this. 2007-07-27 18:29:58 +00:00
665ace6fd6 Small optimalization of drawing bones (drawsolidcube_size and drawcube_size) uses OpenGL displaylists. 2007-07-27 13:58:41 +00:00
a164d91d42 missing include and added a warning to UIBlock 2007-07-27 09:30:54 +00:00
3031f1f2bd =Draw Module Fixed=
This commit fixes the Draw module.  All buttons/widgets created via the Draw
module in a SpaceScript area are now inserted into a global list attached to
the SpaceScript data.  This list is cleared before each draw, when freeing
the space, and when the area is switched to another space.c

This is necessary to prevent Blender's internal UI code from getting invalid
pointers to python data.  In addition, it allows storing widget tooltips
inside the python Button objects, which solves that little bit of stupidity.

Note that this reverts the previous weaklist solution.  In fact, I had to go
over each previous commit by Campbell after this code originally branched
before the weaklist commit and re-add each commit.  So if anything is
missing, just tell me, or feel free to re-add it.
2007-07-27 06:14:25 +00:00
c540888f72 Object Transform:
If object has a parent, and constraints should not be inversed for transform, then constraints are now disabled like tracking is.
2007-07-27 05:03:57 +00:00
670cf8c5a9 fix from 2.44 for adding new curves. 2007-07-26 14:32:32 +00:00
d63da45ca8 Refactor the raytracing code to split the tracing and shading parts into
two separate files, raytrace.c and rayshade.c. The tracing code can now
be used separately from the renderer (will be used in a later commit),
and the raytracing acceleration structure can now also be easily replaced,
if someone wants to experiment with that.
2007-07-26 13:38:24 +00:00
534ba14d2b == PyAPI - Constraints Space Conversion Access ==
Now, for the constraints that support Constraint Space Conversion, those settings can now be set from the PyAPI too.
2007-07-26 12:15:55 +00:00
29660ac778 PyAPI Simple Bugfix:
This fixes a bug reported in IRC. getParentBoneName() was returning a string (most likely from an old bone-parent that got removed), even when the parent wasn't an Armature.
2007-07-26 06:11:58 +00:00
87402dbcbd Transform - Objects with Old-Tracking:
Tracking is now tempolarily disabled while an object matrix used for space conversions stuff is calculated. This used to be done before the constraints recode.
2007-07-25 11:38:50 +00:00
17533e534f removing unneeded checks 2007-07-25 04:45:20 +00:00
9d61411bf2 Transform Bugfixes Part 2 (Constraints Related):
Now PoseBones should transform normally again with constraints applied and in other cases. I've gone back to the old code that used to be there before the recode, and added the constraint inverse (as appropriate) into that.
2007-07-24 12:15:23 +00:00
d0dee342b9 Bugfixes for Transform (related to Constraints):
* Reverting a previous commit where I wrongly assumed that the code was not doing things the right way. This makes a few cases work better normally again.
* Object-level Transforms should now perform normally again. Now, transforms are only get inverse-corrected for constraints if certain constraints are the first 'active' constraint. 
* PoseBone-level Transforms still need to be fixed, although I might have done a few tweaks here.
2007-07-24 11:39:40 +00:00
c8273f4f9e More constraints bugfixes:
* Action constraints on some older files (namely mancandy) should now get correctly loaded. Wrong check for subversion number was being used
* Removed unneeded version patches
2007-07-24 10:24:25 +00:00
65f4cb14c1 == Constraints - Important Bugfix ==
I've finally fixed the bug with the Constraint Space Conversion. It was a single matrix multiplication in the wrong order (for local->pose). 

Also, there is more code added for the space conversion process when bones have 'hinge' on. (NOTE: this stuff for hinge bones may still not work really nice yet)
2007-07-24 05:08:55 +00:00
Ken Hughes
e7ad09f8b5 Removing what appears to be useless code which causes gcc warnings. Appears
to be a cut-n-paste error: Joshua, please double-check.
2007-07-23 20:38:04 +00:00
ca2f34db58 Changed logic for early out to require only one input, not two. This allows for an image to be processed with a value. 2007-07-23 15:22:34 +00:00
3c99fb6389 Bugfix #6918
- Multilayer EXR files:
  Rendering without "do composite" skipped to render the vector pass

- Also found a wrong loop, missing to clear speed vectors in the first 
  pixel of a tile, causing error print:
  "Found uninitialized speed in vector buffer... fixed"
2007-07-23 14:16:41 +00:00
52b699255f == Action Editor - Bugfixes ==
* It is now possible to work on keyframe data/scrub the timeline when the Action Editor is squished up so that the left-hand panel disappears. 
* I'm not sure whether I've eliminated a bug with long-keyframes where sometimes the selection status was show incorrectly (keyframe after keyframe marking end of long-keyframe is selected, results in long-keyframe selection).
* Changed a few obscure comments
2007-07-23 11:45:13 +00:00
939500392e == Constraints - Bugfixes ==
Here are some attempts at fixing bugs being encountered with the constraint system after the recode. I've just fixed a few typos (where relevant), and added some extra checks for things.
2007-07-23 11:28:43 +00:00
56b340b45c =Rendering Bugfix=
For some odd reason, shadow calculation was skipped if diffuse was 0.0.  This
however would cause errors where specularity would ignore shadows.  After all,
just because the shaded diffuse of a point is fully black, doesn't mean
the specularity highlight doesn't include that point.

Ton: you might want to look at this, though it's just a one-liner.
2007-07-23 02:28:47 +00:00
174a914b47 Partial fix for #6875 Normal aligned transform-constraining not working for bone scaling in pose mode
Bone matrix wasn't being applied properly.

There's still a bug left with the translation part of the resize but that is a less frequent situation, so I'll commit this while I figure out a fix.
2007-07-23 01:34:07 +00:00
3d0feeb471 Just a few little code cleanups for IPO cleaning code:
* 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
2007-07-22 10:54:00 +00:00
89792eb7ee fixed some bugs in Draw.c
* 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.
2007-07-21 23:24:08 +00:00
74ca178199 == Transformation Constraint ==
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).
2007-07-21 07:26:15 +00:00
c924fc542b fix for Curve appendNurb 2007-07-21 03:54:20 +00:00
f8a1397b67 removing 2 getset duplicates 2007-07-20 02:23:55 +00:00
6e0d977977 Use texture constants in the interface and added some missing texture constants. 2007-07-19 22:02:22 +00:00
a114f8f17a was missing header 2007-07-19 14:28:57 +00:00
b903864aa5 removing duplicate constants 2007-07-19 12:29:28 +00:00
ecaafbb70c == SDNA - Code Comments ==
Added a few comments about various Animation-System Related structs. Hopefully, these will be helpful for people trying to get familiar with the code.
2007-07-19 11:46:37 +00:00
6789b8fd82 added commends to some DNA_*.h files - as well as some TODO's for removal.
header_view3d.c was doign an implicit declaration also.
2007-07-19 00:42:01 +00:00
29c1727e88 =Shapekey Missing Undopush bugfix=
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.
2007-07-18 15:22:42 +00:00
ff6c3dd0ae == Constraints Work - PyAPI ==
A few tweaks to documentation and implementation of PyAPI access for constraints following Constraints recode. Just doing a little bit of cleanup.
2007-07-17 12:03:17 +00:00
1b0c72c3e5 Removed a variable that wasn't needed, but somehow ended up in the commit the other day. 2007-07-17 11:51:11 +00:00
7fc4306cf2 Small fix: need set the color before call glRasterPos or don't work. 2007-07-16 19:04:42 +00:00
9fc66d5ce5 Bugfix #6831: Crash when combining duplivert and mirror
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.
2007-07-16 12:20:57 +00:00
3792ae1560 bugfixes for generic (experimental) Bullet rigidbody constraint: use cone-twist instead (needs a few more minor fixes)
Note: Visual Studio projectfiles and other buildsystems need to add extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp to the project!
2007-07-16 05:56:51 +00:00
044b354458 Bugfix #6945: Weight painting bug
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.
2007-07-16 05:49:04 +00:00
8f6c18dc17 was missing colorband from the flags in the epy docs 2007-07-15 19:31:45 +00:00
e64e6ae3a3 == MSVC compilation ==
two small fixes in this commit:
- added new file for nodes 
- fixed compile error in readfile.c, as reported by Jean-Michel Soler here:
  http://lists.blender.org/pipermail/bf-committers/2007-July/018849.html
2007-07-15 14:55:09 +00:00
38c84ba938 A few minor changes:
* 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.
2007-07-15 07:05:24 +00:00