Commit Graph

10323 Commits

Author SHA1 Message Date
Campbell Barton
311d7e31cc minor changes from stable 2007-08-01 10:19:16 +00:00
Brecht Van Lommel
a84c598b35 Fix for bug in raytrace code refactoring, crash with empty octree. 2007-08-01 09:49:17 +00:00
Nathan Letwory
f1b0f114c7 * put declaration at *begin* of code block. Now MSVC shouldn't barf anymore. 2007-08-01 05:05:34 +00:00
Brecht Van Lommel
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
Roland Hess
876cfc837e Visual Keying refactor
This code was always kludgy and this clean it up a bit.

insertmatrixkey() has been properly renamed insertkey_float().

Matrix calculations have been excised from the interface code,
and placed in insertmatrixkey(), so that you can call it from
anywhere without preliminaries and the proper values are calced
based on the passed adr code.

By much request, several semi-bug reports and discussion with
production animators, visual keying is now used automatic
for objects and bones that have constraints that cause them
to ignore their Ipos (CopyLoc, TrackTo, etc.). In those cases,
visual keying is used instead of the normal Ipo insertion
method. This "auto" functionality is toggled from the 
"Use Visual Keying" button found along with "Needed" and
"Available" in the Edit Methods prefs.

Logic as to which constraints trigger visual keying on
which adrcodes can be tweaked in match_adr_constraint()
src/editipo.c

This has been tested by a couple of people, myself included,
but I may not have hit every constraint case, so evolutionary
feedback is welcome.
2007-07-31 13:37:59 +00:00
Joshua Leung
5afc4e051f Constraints UI:
* Swapped the order of the CSpace menus. This is so that it makes more sense with the Transform Constraint, to follow a source (target) -> destination (owner) flow.

* 'Local Space' option for Objects has been renamed 'Local (Without Parent) Space'
2007-07-31 12:36:03 +00:00
Joseph Eagar
2e6624a2b8 =Render Bugfix=
Previous bugfix of spec not being included in only shadow lamps had 2 errors.
There weren't any checks for if shi->spec and shi->shad go below 0 because of
an only shadow lamp, and also the code for including spec in only shadow lamps
was slightly wrong.
2007-07-31 05:27:41 +00:00
Joilnen Leite
ab4af04a10 new ICON_FONTPREVIEW 2007-07-30 19:40:23 +00:00
Joilnen Leite
84e817d020 bitmap to fontpreview button 2007-07-30 19:38:03 +00:00
Joilnen Leite
127a232a10 Reverting to python 2.5 and openEXR true as default 2007-07-30 16:44:35 +00:00
Joilnen Leite
443a64135e Font preview 2007-07-30 15:59:16 +00:00
Campbell Barton
ecd42c4342 nested comment 2007-07-30 15:19:42 +00:00
Campbell Barton
848ea23d84 removing unused dna 2007-07-30 13:26:22 +00:00
Joshua Leung
655fb548aa Removing some useless code, and fixed a few compiler warnings. 2007-07-30 11:10:30 +00:00
Campbell Barton
8b127a9bc1 this importer tried to be smart by splitting quads that were not planer. - This is not somthing an importer should do and a user was having problems importing meshes to subsurf from lightwave.
also some other updates, and small cleanup.
2007-07-30 02:24:17 +00:00
Joshua Leung
6dcde0b5be More Constraints Bugfixes:
* Transform Constraint should now work in more cases. Somehow the old code (for location case) wasn't working correctly.
* ChildOf Constraint applied on objects, should now get the right 'inverse'/'offset' matrix set. It now uses the same code that is used by Blender's parenting method to do so.
2007-07-29 11:15:37 +00:00
Brecht Van Lommel
ddbd9182d4 Forgot to commit file in the game engine. 2007-07-28 21:35:32 +00:00
Brecht Van Lommel
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
Andrea Weikert
0281bdac76 == MSVC 7.1 projectfiles ==
- new files rayshade.c and raytrace.c replace ray.c
- new file meshlaplacian.c
2007-07-28 16:28:40 +00:00
Brecht Van Lommel
337a1e53a9 Fix for wrong capitalization in #include. 2007-07-28 14:51:22 +00:00
Brecht Van Lommel
eb8ee6f568 Updates to opennl for mesh laplacian matrix building, to make matrix
building with random access work together with variable locking.
2007-07-28 14:39:30 +00:00
Brecht Van Lommel
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
Joshua Leung
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
Campbell Barton
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
Joshua Leung
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
Joseph Eagar
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
Jiri Hnidek
665ace6fd6 Small optimalization of drawing bones (drawsolidcube_size and drawcube_size) uses OpenGL displaylists. 2007-07-27 13:58:41 +00:00
Campbell Barton
a164d91d42 missing include and added a warning to UIBlock 2007-07-27 09:30:54 +00:00
Joseph Eagar
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
Joshua Leung
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
Campbell Barton
670cf8c5a9 fix from 2.44 for adding new curves. 2007-07-26 14:32:32 +00:00
Brecht Van Lommel
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
Joshua Leung
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
Joshua Leung
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
Joshua Leung
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
Campbell Barton
17533e534f removing unneeded checks 2007-07-25 04:45:20 +00:00
Kent Mein
cb2d93e09d Cleaned up some case issues with language files...
Kent
2007-07-24 15:24:19 +00:00
Joshua Leung
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
Joshua Leung
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
Joshua Leung
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
Joshua Leung
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
Robert Holcomb
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
Ton Roosendaal
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
Joshua Leung
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
Joshua Leung
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
Joseph Eagar
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
Martin Poirier
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
Martin Poirier
becc4feb5f Fix for #6946 Save UV layout broken for large wire sizes
This also helped me pinpoint a couple of off by one errors in the UV rasterizing code. One especially noteworthy was that all UV at 1.0 (on the 0..1 scale) didn't render properly.
2007-07-23 01:12:07 +00:00