Commit Graph

10332 Commits

Author SHA1 Message Date
Ken Hughes
37b5472dd2 Tools
-----
Bugfixes for #6816 and #6988: Under Windows, Blender would crash if boolean
operations were done on objects which resulted in an empty mesh.  Problem was
"iterators" created for ConvertCSGDescriptorsToDerivedMesh() tried to access
invalid memory.
2007-08-03 21:34:13 +00:00
Campbell Barton
c6785e3292 fixes from 2.4x 2007-08-03 16:33:08 +00:00
Joshua Leung
3237a56b5d Bugfix #6983: Incorrect behavior of cancelling transform of IPO CVs
Woops! The code was using the wrong variable in one place.
2007-08-03 12:04:25 +00:00
Joshua Leung
fa5b4954a2 == Bone Roll - Align to Cursor ==
In this commit, a new way to set the bone roll is introduced. It aligns the z-axis of the selected bone(s) to the 3D-Cursor, so that the cursor intersects with the YZ plane. 

This makes it easier to align bone rolls to a target, for use in rigs where arms/legs are not horizontal/vertical. To use this, just press Ctrl N, and choose the "Align Z-Axis to 3D-Cursor" option.

Credits go to Robert Christian (wavez) for providing the method as a working BPy script, that demonstrated this in action.
2007-08-03 11:16:12 +00:00
Joshua Leung
834e64e0e6 Bone Roll Bugfixes (Ctrl R transform mode):
* Now, when X-Mirror is turned on for the armature, the roll from bones being 'rolled' is also mirrored.
* Disabled transform-constraints for this mode, as it didn't really make sense.
2007-08-03 04:04:00 +00:00
Campbell Barton
f707382e1e misc changes from stable 2007-08-01 18:04:44 +00:00
Campbell Barton
b38e987932 armature weakref fix from stable, Curve.c removed unneeded cruft 2007-08-01 12:57:59 +00:00
Joshua Leung
c79e2666a2 == Outliner - Patch #4364 ==
Now the Outliner can be scrolled horizontally too. This was the first patch I ever submitted, but it's gone through many revisions due to ugly Blender bugs that needed to be fixed.

Code Notes:
* I discovered an ancient bug which would cause Blender to hang when loading a file saved with horizontal scrollbars turned on for the Outliner/OOPS. 
* Therefore, I've added special B_SCROLLO and HOR_SCROLLO defines for use by the Outliner only. These are used in place of B_SCROLL and HOR_SCROLL so that older Blender's won't choke on this stuff. Thanks for this suggestion Ton.
* The hanging occurred in draw_scroll in draw_ipo.c
2007-08-01 11:38:47 +00:00
Joseph Eagar
9df1b7d1fb =Lack of #ifdef INTERNATIONAL=
Recent font preview commit didn't have the proper enclosing #ifdef INTERNATIONAL
blocks.  Honestly, I have no idea why we bother, but added them anyway.
2007-08-01 10:33:01 +00:00
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