Commit Graph

220 Commits

Author SHA1 Message Date
Campbell Barton d75a66674d code cleanup: remove deprecated defines and some struct members 2012-09-06 00:33:59 +00:00
Campbell Barton aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
Brecht Van Lommel fa6a8b8090 Fix #32389: scons was compiling without iksolver and only itasc since a few days,
which gave performance issues.
2012-08-23 10:56:14 +00:00
Campbell Barton 47e313ec0c cmake option to build without iksolver 2012-08-18 13:36:29 +00:00
Thomas Dinges 3151a9f145 Fix compile error, IK_STRETCH_STIFF_EPS was undefined. 2012-07-29 19:50:03 +00:00
Campbell Barton f608b3c444 code cleanup:
- building without python works again
- rename maxi/mini to i_max/i_min (so thay are available for function names)
- some minor edits to IK stretch setting (no functional changes).
2012-07-29 17:49:14 +00:00
Campbell Barton c41e1e434a code cleanup: replace MIN2/MAX2 with minf/maxf 2012-07-29 16:59:51 +00:00
Campbell Barton 2cd0b3f064 defines to make it easier to manage ik stretch constants (these may need to be tweaked to fix [#32174]) 2012-07-27 23:16:33 +00:00
Campbell Barton 81829f5221 code cleanup: use const for passing vectors 2012-07-11 12:42:02 +00:00
Campbell Barton cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
Bastien Montagne 468ef74ed7 More spell and typo fixes (mostly visualise->visualize, grey->gray, normalise->normalize). 2012-07-03 19:09:07 +00:00
Campbell Barton 1597ad9377 style cleanup 2012-07-01 09:54:44 +00:00
Benoit Bolsee 2b889eea8d Fix [#31430] part 2: crash in iTaSC when end effector is a fixed bone. This situation was causing access to invalid index in the joint angle array although the end effector doesn't need any joint angle to compute its pause. Fixed this by changing the internal API of joint array: return pointer instead of reference so that NULL pointer can be returned instead of crashing when the index is invalid. 2012-06-07 08:16:41 +00:00
Benoit Bolsee ef850d75f5 Fix unaligned array crash in Eigen3 because of compilation option. The EIGEN_DONT_ALIGN_STATICALLY compilation option was added for Win32 only in revision 41283 because of some compilation problem. But this option is causing alignment problem for Eigen3 local variables when SSE optimization is enabled. I do not have any compilation problem when the option is not defined, so I just remove it as it should. 2012-06-07 08:04:58 +00:00
Benoit Bolsee e063ea222c Fix bug [#31588]: iTaSC does not handle armature scaling correctly. iTaSC solver operates in world reference, therefore armature scale is used to build the ik scene. But the scaling was not taken out when applying the pose at the end of the simulation. 2012-06-03 12:06:42 +00:00
Campbell Barton 57c292daf0 style cleanup 2012-05-25 09:51:53 +00:00
Brecht Van Lommel 29a1a05aa5 Fix #31430: itasc solver assertion failure with debug builds. 2012-05-18 15:06:23 +00:00
Campbell Barton 1dccd4c98a code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05 16:03:57 +00:00
Campbell Barton e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
Campbell Barton b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
Bastien Montagne 3dcd5a196d Fix [#31008] IK armature resize goes ugly (Pose mode resize).
This affected legacy solver. Note that even if I don't expect any, this fix *may* break some other IK setups, so animators, please check your IK rigs using legacy solver. ;) Easy to revert if needed, anyway.

Note that iTaSC solver is also buggy with some scaled parent, but here IK'ed bones just can’t get scaled in any way (either from parent or from there own transformation)... Will try to find what's happenning, though the code is even harder than legacy solver to follow :/
2012-04-20 17:26:40 +00:00
Campbell Barton 07065b27b8 style cleanup 2012-03-28 05:03:24 +00:00
Campbell Barton b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
Campbell Barton 81d8f17843 style cleanup: pep8, indentation 2012-03-24 07:36:32 +00:00
Campbell Barton 5a90ea77bc style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:24:53 +00:00
Campbell Barton 89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
Campbell Barton 7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
Campbell Barton e6c5ff95be patch [#30331] Support clang-3.0
from Yasuhiro Fujii (y-fujii)

only small part of the patch for now.
2012-02-28 05:19:54 +00:00
Campbell Barton 47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
Campbell Barton 2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
Brecht Van Lommel 3311164b24 Math lib: matrix multiplication order fix for two functions that were
inconsistent with similar functions & math notation:

mul_m4_m4m4(R, B, A) => mult_m4_m4m4(R, A, B)
mul_m3_m3m4(R, B, A) => mult_m3_m3m4(R, A, B)

For branch maintainers, it should be relatively simple to fix things manually,
it's also possible run this script after merging to do automatic replacement:
http://www.pasteall.org/27459/python
2011-12-16 19:53:12 +00:00
Brecht Van Lommel b5a57b193d Fix #29041: parenting problem with tree IK for iTaSC and iksolver, where it
would use the wrong bone as parent on brancing. Patch by Juha Maki-Kanto.
2011-11-13 13:08:15 +00:00
Campbell Barton 094c9799f9 quiet -Wdouble-promotion warnings 2011-11-11 12:00:08 +00:00
Joshua Leung 2b6e4f2422 Bugfix [#29064] armature with curve contraint - crash
Spline IK and Auto-IK working together on the same bone chain could
crash due to the somewhat hacky way that they were sharing the same
list for the "iktree" forest. Resolved by doing what I should have
done from the beginning, and made Spline-IK save its ik chains off
into a separate list.

While this fixes the crash, it might be worth investigating outright
disabling this from working in this case, since it can be a bit
confusing to have it appear to not work.
2011-11-07 13:25:17 +00:00
Campbell Barton 96d73bfdcf replace VECCOPY with copy_v3_v3, same for 2d copy, also added vec copy functions for int & char. 2011-11-07 01:38:32 +00:00
Sergey Sharybin fe6ad36060 Fix compilation error for win32.
That static align trick i've wrote about is still necessary.
2011-10-25 18:13:12 +00:00
Sergey Sharybin 3d903ee3ff Libraries upgrade:
- Upgrade Eigen2 library to Eigen3
- Upgrade colamd library and placed in extern/ so other libraries from extern/ can use it

NOTE: With previous version of Eigen (3.0.1) it was necessary to define
      EIGEN_DONT_ALIGN_STATICALLY macro to make it compilable on windows 32bit.
      After latest upgrade it seems to be unnecessary (at least when was testing libmv),
      so i removed that defines which can reduce speed and lead to other problems.
2011-10-25 12:37:42 +00:00
Campbell Barton 4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton 5792bd7cc7 cmake: cleanup include paths, some duplicates and going up some unneeded dirs. 2011-07-17 09:11:13 +00:00
Campbell Barton 09da9d4393 cmake maintenance
blender_add_lib now takes a separate include argument to suppress warnings in system includes (mostly ffmpeg & python).
also only build wm_apple.c on apple+carbon configuration.
2011-05-31 01:15:44 +00:00
Campbell Barton b11f29c8ac clear some c++ warnings. 2011-03-27 07:56:29 +00:00
Campbell Barton 709c727c51 replace 0 with NULL when used as a pointer 2011-03-03 17:58:06 +00:00
Nathan Letwory 13a540a41d doxygen: blender/ikplugin tagged. 2011-02-27 20:24:49 +00:00
Nathan Letwory 5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
Campbell Barton 89c617a116 remove nan-makefiles 2011-01-30 15:29:22 +00:00
Campbell Barton 89c9aaaa25 remove references to BKE_utildefines where its not needed.
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +00:00
Campbell Barton 8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
Campbell Barton 5e382eb8e5 rename blenderlib to blender_add_lib 2010-12-22 23:09:30 +00:00
Campbell Barton afacd18498 use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed. 2010-12-08 08:43:06 +00:00
Campbell Barton e8397e6193 include headers in cmake source, added a script to check for consistency, reporting missing headers & C files.
this is important so IDE's using CMake integration always get blender headers. - QtCreator & MSVC for eg, probably others too.
2010-11-29 04:35:56 +00:00
Campbell Barton 2777ba74b0 remove include paths which dont exist, fix for doc upload script which was getting the blender version twice and not working sometimes. 2010-10-27 13:52:12 +00:00
Campbell Barton c6976e7351 use explicit file paths for CMake rather then globing, This is recommended by cmake devs.
globbing vs explicit is discussed here.
http://www.cmake.org/pipermail/cmake/2008-December/025694.html

Practical implications are:
- developers need to keep CMakeLists.txt files up to date.
- Users wont get strange linking errors if they build after a file is added, since CMake detects CMakeLists.txt is modified and automatically reconfigure.
2010-10-23 04:05:55 +00:00
Campbell Barton 1807beabf5 - UNUSED macro wasn't throwing an error with GCC if a var become used.
- made interface, windowmanager, readfile build without unused warnings.
- re-arranged CMake's source/blender build order so less changed libs are build later, eg: IK, avi
2010-10-16 02:40:31 +00:00
Campbell Barton 25bbf99a79 replace SIDE_OF_LINE macro with line_point_side_v2() inline function.
made a number of files build without unused warnings.
2010-10-15 05:18:45 +00:00
Campbell Barton 74059891e9 option to disable ITASC IK solver, (will be enabled by default ofcourse)
- option only available to cmake, scons and make have this enabled always.
- without this clang/llvm can compile blender
- this was the second biggest internal lib, 192mb -> 172mb for all blenders libs (with debug flags), so gives some speedup to linking.
2010-09-12 12:27:12 +00:00
Campbell Barton d1759639dc - remove unused includes IMB_*, BIF_* & MEM_*
- remove MEM_guardedalloc.h from header files (include directly)
2010-08-16 05:46:10 +00:00
Guillermo S. Romero 95aa8cfa4a Update address in license block. 2010-08-10 21:22:26 +00:00
Campbell Barton 3bf2715039 apply visual transform to pose
So constrainted bones can have their transform applied to their loc/scale/rot, then remove the constraints
2010-02-19 15:34:26 +00:00
Campbell Barton 081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Matt Ebb 0c5998e799 Radians -> Degrees (in UI)
Rotations are now stored internally as radians, while exposing degrees in the UI - 
in the graph editor and UI controls. This is done in two areas:
1) Using the unit system to convert RNA data to display as degrees in the UI controls
2) FCurves now use degrees for rotation, so you can edit in the graph editor what 
you see in the UI.

All rotation data is consistently accessible in DNA and RNA as radians, degrees are only 
used for the UI controls and graph editor.

This commit includes conversions will convert old files (stored data and also fcurve data) 
to the new units, hopefully everything should go smoothly!

Part of this also changes a few properties that were hard-coded as degrees before (such 
as IK pole angle and brush texture rotation) to also use the same consistent system of 
radians (dna/rna) and degrees (ui).

Thanks to Joshua for hints and review here too.
2010-01-25 06:24:05 +00:00
Brecht Van Lommel 37e4a311b0 Math Lib
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
  conversion script instead, if they use a lot of math functions
  in new code:
  http://www.pasteall.org/9052/python
2009-11-10 20:43:45 +00:00
Joshua Leung 2068eaf1b7 Rigging Goodies: Spline IK Constraint
At last, this commit introduces the Spline IK Constraint to Blender. Spline IK is a constraint that makes n bones follow the shape of a specified curve. 

Simply add a chain of bones, add a curve, add a Spline IK Constraint to the tip bone and set the number of bones in the chain to make it work. Or, try the following test file:
http://download.blender.org/ftp/incoming/250_splineik_spine01.blend

Screenshots of this in action (as proof):
http://download.blender.org/ftp/incoming/b250_splineik_001_before.png
http://download.blender.org/ftp/incoming/b250_splineik_001_after.png

I've implemented this in a similar way to how standard IK solvers are done. However, this code is currently not an IK plugin, since I imagine that it would be useful to be able to combine the 2 types of IK. This can be easily changed though :)

Finally, a few notes on what to expect still:
* Constraint blending currently doesn't affect this. Getting that to work correctly will take a bit more work still.
* Options for not affecting the root joint (to make it easier to attach the chain to a stump or whatever), and non-uniform scaling options have yet to be added. I've marked the places where they can be added though
* Control over the twisting of the chain still needs investigation. 

Have fun!
2009-11-01 11:29:40 +00:00
Ton Roosendaal 0e5a6a21e8 Fixes to get Blender compile and run on PowerPC OSX 10.3, gcc 3.3
(yes antique, but having 5 year old OS's work is very cool)

In short:
- include <cmath> after <math.h> fails
- STL template issues (recursion, syntax)
2009-10-20 15:51:18 +00:00
Benoit Bolsee 96d2dc7d09 iTaSC: Selection of constrained axis for CopyPose constraint
This commit implements more of the CopyPose capabilities in
Blender. It is now possible to select which axis will be
constrained in position and orientation to obtain
interesting effects. Another option selects if the axis
are relative to the end effector or to the target.

Unlocking a position axis means that the coordinate along
this axis is not constrained and can take any value.
Unlocking the Y axis of the End Effector produces an
'aiming' effect: the end effector is oriented towards
the target but without stretching.

Unlocking a rotation axis means that the end effector can
freely rotation along that axis. Unlocking the Y axis
produces a 'tangent' effect: the end effector aligns with
the Y axis of the target but can rotate along that axis.

A 'floor' effect is possible if the position Z axis of the
target is unlocked. More effects are possible an can be
combined.
2009-10-14 18:51:00 +00:00
Joshua Leung 829bbda7f5 Bugfix #19616: vertex group select as IK target cause crash in Blender2.5
Thanks to Masahito Takahashi (mato)  for the report and patch to fix this!
2009-10-12 09:39:57 +00:00
Joshua Leung 7d2fd5449e Durian Feature Request: Rotation Modes for Objects
This (biggish) commit generalises the rotation modes functionality added for Bones, allowing Objects to use the various Euler Rotation orders, Axis-Angle, and Quaternion rotation representations.

I've also cleaned up the nomenclature of the rotation-related settings so that the naming styles are more consistent with each other. Unfortunately, this will break all files involving object or bone rotation animation made in 2.5 versions (2.4x will still get correctly converted).

General Notes:
* By default, Objects still default to using Eulers, while Bones will use Quaternions by default still.
* I've fixed all areas that I'm currently aware of to work with these changes. However, there are probably a few places where I've missed a few changes (i.e. auto-keyframing will need attention later).
* Removed the old "IPO-Keys" stuff from Transform code. I'm unlikely to restore this in the near future, and trying to fix that to include support for this commit would have been too much work.
2009-09-28 10:19:20 +00:00
Kent Mein 72c4c9da7a Fixing up Makefiles, its not fully working but its closer...
Kent
2009-09-25 18:47:43 +00:00
Brecht Van Lommel 5eecb2ab48 Warning fixes for ITASC. Also, use <stdlib.h> instead of <malloc.h>,
it works everywhere.
2009-09-25 09:33:46 +00:00
Campbell Barton 2060127e1f missing includes 2009-09-25 01:29:30 +00:00
Benoit Bolsee 1483fafd13 Merge of itasc branch. Project files, scons and cmake should be working. Makefile updated but not tested. Comes with Eigen2 2.0.6 C++ matrix library. 2009-09-24 21:22:24 +00:00