Commit Graph

435 Commits

Author SHA1 Message Date
5148828356 svn merge ^/trunk/blender -r44235:44250 2012-02-19 17:59:30 +00:00
5cd85ed57e More pose armature code factorization:
* New armature_mat_bone_to_pose, which is just the reverse of armature_mat_pose_to_bone (currently used by armature evaluation code only, but might be used by constraints space conversion code too, see note below).
* Found another place where another (a bit erroneous) pose_to_bone code existed (apply_targetless_ik(), in transform_conversion.c, used by "auto ik" option), replaced it by a call to armature_mat_pose_to_bone.

Notes:
* All those changes leave many #if 0 commented code, I will remove those in a few weeks.
* There is at least one other place where generic armature_mat_(pose_to_bone/bone_to_pose) functions should be usable: the space conversion function of constraints (constraint_mat_convertspace(), in BKE's constraint.c), but here I have some problems (old code is also somewhat erroneous, but using new one makes old rigs using bone space constraints wrong, e.g. sintel one, and it’s just impossible to make conversion code...). So I'll wait and investigate more for this one.
2012-02-19 11:09:44 +00:00
a677e016d6 remove function for testing selection (was only used in a few places) 2012-02-17 21:49:24 +00:00
37ff2a291f BMesh api function naming.
`_set` suffix was used in two ways (confusing)
* to set a flag to be enabled.
* to set a value passed as an argument.

now use enable/disable rather then set/clear for functions which change flags.

also remove BME_weld.c, the file didnt contain much code and the current extrude works well
2012-02-12 18:43:59 +00:00
b6dcdb065d code refactor, function renaming for bmesh.
These changes are to make the bmesh api more consistent and easier to learn, grouping similar functions which is convenient for autocomplete.
This uses similar convention to RNA. 

* use face/loop/edge/vert as a prefix for functions.
* use 'elem' as a prefix too for functions that can take any type with a BMHeader.
* changed from camel case to underscore separated (like RNA).
2012-02-12 10:51:45 +00:00
8b43813b69 rename BM_ flags for BMHeader->hflag to BM_ELEM_ to be more clear that these flags apply to bmesh elements. 2012-02-12 06:24:12 +00:00
19d0f93099 svn merge ^/trunk/blender -r43934:43976 2012-02-08 05:45:16 +00:00
4cb9c2db86 Fix #30052: VSE: metastrips don't move with Extend (E)
Issue was caused by transformation tools weren't taking metastrip clips into
account, so strip inside of merastrips are placedon different from metastrip side
of time cursor, extension happened in unexcpected way.
2012-02-07 14:27:08 +00:00
075fee4d58 svn merge ^/trunk/blender -r43830:43864 2012-02-03 01:30:21 +00:00
050963b6a9 fix [#27953] VSE: weird drawing and placement issues strips during 'E'
was calculating meta / effect in wrong order causing delay, now calculate selected meta's, then all effects after tramsforming.
2012-02-03 01:06:32 +00:00
54b00c33ca fix [#30007] Mesh Edit: hidden geometry causes crash when...
transform was not skipping hidden vertices.
2012-02-02 20:36:34 +00:00
4aa82806ef svn merge ^/trunk/blender -r43751:43819, need to look into changes made to editmesh_loop.c from this range still 2012-02-01 09:31:13 +00:00
942413bdb2 Fix #30021: Crash happens when rotating markers 2012-01-30 09:10:58 +00:00
25a3d11260 avoid using resizing array for transform (size is known to begin with, use single alloc) 2012-01-23 13:15:40 +00:00
7b2101ace9 svn merge ^/trunk/blender -r43482:43524 2012-01-19 11:31:31 +00:00
16ffa8e8f4 Curve points of tracking curves now can be grabbed to smooth spikes
Curve points of tracks curves now can be selected for X and Y channels
separately and can be moved along Y axis of curve viewer, points currently
can't change frame they belong to. This allows to smooth spikes caused by
unwanted marker jump.

Also fixed some mistakes in cancel transform in cases when locked tracks
were being trying to be moved; fixed incorrect calculation of marker speed
for curve drawing.
2012-01-18 16:45:02 +00:00
47b9f5d8f8 svn merge ^/trunk/blender -r43443:43461 2012-01-17 17:08:32 +00:00
e5d4ecd180 Fix #29905: extend transform a sequencer meta strip did not update the position
and length of the meta strip properly, only its contents. Also overlap check was
done too soon giving false positives, should be after meta strip update.
2012-01-17 16:06:24 +00:00
25e3b647b1 New pchan to pose matrices computes. Fixes [#27898] Bone snap to cursor fails and [#29461] Selection-to-Cursor works strange with bones with TrackTo constraint. Also fixes some inconsistant behavior of no Inherit Rotation/Scale options.
WARNING: This commits modifies how translated unconnected child bones with *no Inherit Rotation option* are positionned. This means that if you open a posed/animated armature using such (corner-case) setup, you'll have to adjust manually the locations of such bones: now, disabling Inherit Rotation/Scale will no more move the bone, only affecting its rotation/scale.

Many thanks to Bassam Kurdali (slikdigit) for his advices and tests of the patch!

-----

Dev notes : the pchan_to_pose_mat() func was added to BKE_armature.h, which computes two matrices to get the pose transformations (pchan) of the bone directly in pose (i.e. armature object) space. The first matrix is the rotation/scaling parts, the second one is for location.

That new function is used by (hence deduplicating and simplifying their code):
* The pose evaluation code (where_is_pose_bone()).
* The interactive transformation code (add_pose_transdata(), in transform_conversion.c).
* The snap to cursor/grid code (through armature_loc_pose_to_bone()/armature_mat_pose_to_bone()).
2012-01-17 13:30:20 +00:00
917714acf7 svn merge ^/trunk/blender -r43345:43381 2012-01-15 09:16:39 +00:00
12520b4e06 Fix #29873: transform with individual origins not working in edge select mode. 2012-01-13 14:56:41 +00:00
81f5c9ed9b svn merge ^/trunk/blender -r42991:43009 2011-12-31 03:07:14 +00:00
fd134927dd Merging r42800 through r42895 from trunk into soc-2011-tomato 2011-12-27 10:11:07 +00:00
4ced91da47 svn merge ^/trunk/blender -r42778:42839 2011-12-23 08:41:53 +00:00
51016c4dea split >120 length lines (mostly if statements) 2011-12-22 00:03:20 +00:00
96bd647c4f split some >120 lines, no functional changes 2011-12-21 22:56:06 +00:00
737648a0bf Merging r42648 through r42722 from trunk into soc-2011-tomato 2011-12-19 10:39:40 +00:00
5c6ee6b523 svn merge ^/trunk/blender -r42670:42680 2011-12-17 02:41:53 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
db6cb30941 svn merge ^/trunk/blender -r42669:42670 2011-12-16 23:50:55 +00:00
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
ba16e7d631 Object tracking: object with object solver constraint is now parented to scene's camera
Made Object Solver operator parent object to scene's camera. Behavior is pretty much
familiar to Child Of constraint -- it stores inverted transformation matrix which gives
constant offset in parent's space.
Current files would open incorrect, to make object aligned well again, just press
"Set Inverse" button in Object Solver constraint.
Fixed orientation operators so now they should work in all cases.
Also changed behavior of Set Origin operator which now sets origin to the median
point of all selected tracks/
2011-12-15 16:09:57 +00:00
b865c0314f Merging r42533 through r42601 from trunk into soc-2011-tomato 2011-12-13 11:58:59 +00:00
ab6c810212 remove unused function, found when syncing with bmesh, also remove/comment some unused defines 2011-12-10 20:10:28 +00:00
6bc55f2e4a minor cleanup and sync with trunk 2011-12-10 18:41:53 +00:00
65e70985c4 fix [#29541] Scale of faces incorrect when using individual origins 2011-12-10 18:25:56 +00:00
9355cc5c39 Object tracking; initial commit
This commit implements basis stuff needed for object tracking,
use case isn't perfect now, interface also should be cleaned a bit.

- Added list of objects to be tracked. Default there's only one object called
  "Camera" which is used for solving camera motion. Other objects can be added
  and each of them will have it;s own list of tracks. Only one object can be used
  for camera solving at this moment.
- Added new constraint called "Object Tracking" which makes oriented object be
  moving in the save way as solved object motion.
- Scene orientation tools can be used for orienting object to bundles.
- All tools which works with list of tracks or reconstruction data now
  gets that lists from active editing object.
- All objects and their tracking data are available via python api.
2011-12-05 18:57:17 +00:00
22a1ad61f9 svn merge ^/trunk/blender -r42372:42416 2011-12-04 18:39:19 +00:00
3fdc28b736 add a new object member to store the dsize, since with my recent commit broke forward compatibility. now the new values are copied into 'dscale' and existing ones remain.
this is annoying since now we have dsize and dscale, will look into a way to deprecate struct members next.
2011-12-04 03:35:54 +00:00
f2551ff799 - add BM_NGON_STACK_SIZE define to use wherever ngon stack arrays are used.
- renamed BM_Compute_Face_Center() to BM_Compute_Face_CenterBounds() and added BM_Compute_Face_CenterMean() since there was code inline to find the mean center in transform.
2011-11-29 04:11:17 +00:00
f28fd56f8f svn merge ^/trunk/blender -r42095:42116 2011-11-24 05:33:22 +00:00
da849bbfc0 prepare for flagging the bmesh has having invalid index values, so we can skip looping over all elements if its already valid.
- went over every BM_SetIndex call and added comments about its use, if its setting dirty values or correct ones.
- replace loops over all elements _just_ to set index values, with a new function, BM_ElemIndex_Ensure(...), this will eventually only initialize values when they are dirty.
2011-11-16 12:38:40 +00:00
e59ab6486f svn merge -r41751:41779 ^/trunk/blender 2011-11-15 02:05:32 +00:00
e84c0980a3 correct indentation and some whitespace edits (no functional changes) 2011-11-11 13:09:14 +00:00
121ff4223d svn merge -r41655:41715 ^/trunk/blender --- this is the real cycles merge, needs some edits to cycles its self before cycles will build 2011-11-10 04:17:43 +00:00
58f3503e90 Fix #29201: movie clip editor - right click crashes blender
Just another not very smart check for "boundary" case of usecase.
2011-11-08 16:09:20 +00:00
cb890a49fb svn merge ^/trunk/blender -r41602:41638 . 2011-11-08 02:57:28 +00:00
27d42c63d9 Camera tracking integration
===========================

Commiting camera tracking integration gsoc project into trunk.

This commit includes:

- Bundled version of libmv library (with some changes against official repo,
  re-sync with libmv repo a bit later)
- New datatype ID called MovieClip which is optimized to work with movie
  clips (both of movie files and image sequences) and doing camera/motion
  tracking operations.
- New editor called Clip Editor which is currently used for motion/tracking
  stuff only, but which can be easily extended to work with masks too.

  This editor supports:
  * Loading movie files/image sequences
  * Build proxies with different size for loaded movie clip, also supports
    building undistorted proxies to increase speed of playback in
    undistorted mode.
  * Manual lens distortion mode calibration using grid and grease pencil
  * Supervised 2D tracking using two different algorithms KLT and SAD.
  * Basic algorithm for feature detection
  * Camera motion solving. scene orientation

- New constraints to "link" scene objects with solved motions from clip:

  * Follow Track (make object follow 2D motion of track with given name
    or parent object to reconstructed 3D position of track)
  * Camera Solver to make camera moving in the same way as reconstructed camera

This commit NOT includes changes from tomato branch:

- New nodes (they'll be commited as separated patch)
- Automatic image offset guessing for image input node and image editor
  (need to do more tests and gather more feedback)
- Code cleanup in libmv-capi. It's not so critical cleanup, just increasing
  readability and understanadability of code. Better to make this chaneg when
  Keir will finish his current patch.

More details about this project can be found on this page:
    http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2011

Further development of small features would be done in trunk, bigger/experimental
features would first be implemented in tomato branch.
2011-11-07 12:55:18 +00:00
7508540c53 svn merge -r41575:41602 ^/trunk/blender 2011-11-07 07:01:24 +00:00
7c88bc5952 replace macros for bli math functions in editors 2011-11-06 16:34:44 +00:00