Commit Graph

31845 Commits

Author SHA1 Message Date
Campbell Barton
ec142edaa0 code cleanup: use for loops for mask/spline looping 2012-05-18 14:49:30 +00:00
Campbell Barton
2870366d72 rename 'mask shape' to mask object, will make adding shape keys less confusing. 2012-05-18 12:51:11 +00:00
Campbell Barton
f82bb6fb4e fix error with mask translation not quite following the mouse. 2012-05-18 10:02:14 +00:00
Campbell Barton
a8a22d968c mask: remove aspect arguments which are no longer needed. 2012-05-18 09:36:32 +00:00
Sergey Sharybin
2da49c4a8f Rotation support for motion tracking markers
Implemented general transformation tool Rotation for motion tracking data.
Mainly used to rotate pattern of markers.

To achieve most of usability, added configurable pivot point which is in fact
was median point before, but now can be chosen from boundbox center, median point
or individual centers. Individual centers means transformation would be performed
around marker's position, which is useful for rotation and scale.

Also implemented alternative scaling transformation -- hit S, S leads to
scaling of pattern area only.

TODO:
- clamping in some cases isn't working well, but that's easier to be resolved
  after moving search are to marker.
- Update startup.blend so clip editor in Motion Tracking screen would be set to
  Individual Centers by default.
2012-05-18 09:33:50 +00:00
Campbell Barton
f21cd531d6 mask editor now stores points/handles in 1:1 aspect, makes tool code _much_ more logical/easier. 2012-05-18 08:59:05 +00:00
Keir Mierle
7414ccfeeb Add light-normalized tracking to the planar tracker
This commit adds the ability to normalize patterns by their
average value while tracking, to make them invariant to global
illumination changes.

To see this in action, check out the "Lobby" scene from Hollywood
VFX. If you track the markers that are shadowed by the actress,
previously they would not track. With the scale adaption on, the
tracker would shrink the area to compensate for the changed
illumination, losing the track. With "Normalize" turned on, the
patch is correctly tracked and scale is maintained.

A remaining problem is that only the Ceres cost function is
updated to handle the normalization. The brute translation search
does not take this into account. Perhaps "Prepass" (see below)
should get disabled if normalization is enabled until I fix the
prepass to normalize as well.

There are a few other changes:

- Cleanups in tracking RNA comments.

- Bail out of the sampling loop early if the mask is zero; this
  saves expensive samples of the image derivatives.

- Rename the wordy "Translation initialization" to "Prepass" at
  Sebastian's suggestion.

- Fix a bug where the mask was ignored when sampling in the cost
  functor.
2012-05-18 02:12:47 +00:00
Keir Mierle
d78b7fc946 Fix the brute-force toggle in the motion tracker. 2012-05-17 20:21:26 +00:00
Campbell Barton
db46f9b552 fix a bug and storing a bool as a float 2012-05-17 18:55:34 +00:00
Keir Mierle
82e45dd275 Add panels for the new planar tracker
This replaces the old style tracker configuration panel with the
new planar tracking panel. From a users perspective, this means:

- The old "tracking algorithm" picker is gone. There is only 1
  algorithm now. We may revisit this later, but I would much
  prefer to have only 1 algorithm. So far no optimization work
  has been done so the speed is not there yet.

- There is now a dropdown to select the motion model. Choices:

  * Translation
  * Translation, rotation
  * Translation, scale
  * Translation, rotation, scale
  * Affine (Not implemented yet)
  * Perspective

  The most stable is the "translation" parameterization. The
  others work but still require some tweaking.

- The old "Hybrid" mode is gone; instead there is a toggle to
  enable or disable translation-only tracker initialization. This
  is the equivalent of the hyrbid mode before, but rewritten to work
  with the new planar tracking modes.

- The pyramid levels setting is gone. At a future date, the planar
  tracker will decide to use pyramids or not automatically. The
  pyramid setting was ultimately a mistake; with the brute force
  initialization it is unnecessary.
2012-05-17 17:09:51 +00:00
Sergey Sharybin
9932bb1dd6 Tomato: sliding corner with Ctrl holded down would have scaling behavior 2012-05-17 16:45:02 +00:00
Campbell Barton
81016d59b6 fix for building without aud 2012-05-17 15:01:51 +00:00
Sergey Sharybin
1670b1ed99 Remove debug code and clean up sources to match common style used
Also made BKE_tracking_get_search_imbuf use space conversion utility functions,
so now it's not so annoying that search area calculation is happening differently
in different paces.

Also allow even sizes for search area.

Another small fix is about flipping search area dumping by libmv-capi.
It used to be flipped since in blender Y axis is up-aimed.
2012-05-17 13:53:20 +00:00
Campbell Barton
fddb05024e use vertex arrays for drawing mask splines 2012-05-17 12:08:37 +00:00
Campbell Barton
37f6ed397d svn merge ^/trunk/blender -r46699:46714 2012-05-17 09:34:22 +00:00
Campbell Barton
dfa075b662 added readonly rna ID attribute ID.is_library_indirect, so python can tell if a link is direct or not. 2012-05-17 09:17:39 +00:00
Campbell Barton
599d213115 style cleanup: line length and ensure some macros error when not ending with ';' 2012-05-17 07:59:25 +00:00
Joshua Leung
27f224f12a Nitpicky stuff
* Ensure "Base" is fully nullified before anyone uses it
* Force channel flush when changing Action Editor modes
2012-05-17 02:50:07 +00:00
Keir Mierle
0a917fa1c3 Add new planar tracker features and use the new planar API
This commit removes the use of the legacy RegionTracker API from
Blender, and replaces it with the new TrackRegion API. This also
adds several features to the planar tracker in libmv:

- Do a brute-force initialization of tracking similar to "Hybrid"
  mode in the stable release, but using all floats. This is slower
  but more accurate. It is still necessary to evaluate if the
  performance loss is worth it. In particular, this change is
  necessary to support high bit depth imagery.

- Add support for masks over the search window. This is a step
  towards supporting user-defined tracker masks. The tracker masks
  will make it easy for users to make a mask for e.g. a ball.

- Add Pearson product moment correlation coefficient checking (aka
  "Correlation" in the UI. This causes tracking failure if the
  tracked patch is not linearly related to the template.

- Add support for warping a few points in addition to the supplied
  points. This is useful because the tracking code deliberately
  does not expose the underlying warp representation. Instead,
  warps are specified in an aparametric way via the correspondences.

- Remove the "num_samples_xy" concept and replace it with
  automatic determination of the number of samples. This makes the
  API easier for users.

- Fix various bugs in the parameterizations.

There remains a bug with subpixel precision tracking when in
"keyframe" mode; this will get fixed shortly.
2012-05-17 02:31:52 +00:00
Campbell Barton
9dd981a440 style cleanup: block comments 2012-05-16 23:37:23 +00:00
Nicholas Bishop
18a7efac14 Fix for clay strips brush not showing Add/Subtract buttons. 2012-05-16 22:27:45 +00:00
Bastien Montagne
1b6600c3e8 Fix [#31432] Angles values stuck at 60 degrees. 2012-05-16 20:35:09 +00:00
Campbell Barton
7e5348f4c5 improvements to mask editor path editing
- adding new points de-selects previous so Ctrl+Click+Drag works usefully.
- cyclic curves now extrude properly
- adding new points inbetween existing now use the surrounding points handle length.
2012-05-16 18:05:35 +00:00
Campbell Barton
09bb37fe93 svn merge ^/trunk/blender -r46684:46699 2012-05-16 16:41:51 +00:00
Campbell Barton
bd45c0008c evil mango feature, alt transform sequence strips bumps other strips out of the way 2012-05-16 16:28:33 +00:00
Bastien Montagne
04bc61a0d5 Nodes i18n: don't call gettext stuff twice for categories' names, when building Add menu.
Now ui-names in foreach_nodeclass functions are only marked as translatable, it’s up to the callback to actually translate them or not!
2012-05-16 15:01:46 +00:00
Brecht Van Lommel
fc576add9f Fix issue with linked dupli objects not being displayed in the viewport, if they
have no object bounding box. Better fix will be to figure out why they are the
bounding boxes are not made.

Thanks to Campbell to tracking down the commit that caused this.
2012-05-16 14:36:15 +00:00
Antony Riakiotakis
5ff7ede1b5 modal operation for bevel and inset:
This commit adds some first building blocks for the two operators to work modally based on mouse input. To make their function easier, two hotkeys are introduced, Ctrl+B for bevel and I for inset.

TODO:
After discussion with Campbell, we would like to add scale-style line indicators for the operators. This is already done for transform operators but a new interface for mesh operations may have to be written using pieces from that code since, strictly speaking bevel and inset are not exactly "transform" operators.

Also, a better input method for inset is needed and more options exposed. The method implemented right now uses mouse move for thickness and ctrl-mouse move for depth. These are calculated using the distance of the selection center in screen space and the mouse position. While that may work and prevents abrupt changes in values when switching from thickness tweak mode to depth tweak mode, it limits the magnitude of values that can be put into the tool especially in small or large scale. 

Alternatives until a better method is written include:

* use relative offset (works but may give strange results)
* tweak manually after the operation.
2012-05-16 14:30:41 +00:00
Bastien Montagne
2e89e0096a Spell check fix (lenght -> length)
Note: two remains, in comments in extern/bullet2/src/LinearMath/btVector3.h and extern/libmv/libmv/image/tuple.h.
2012-05-16 14:25:25 +00:00
Campbell Barton
2be8263db4 style cleanup: indentation 2012-05-16 12:14:31 +00:00
Gaia Clary
2c05190374 fix [#31320] Collada now supports import/export of loose edges (edges not attached to faces) 2012-05-16 11:21:03 +00:00
Lukas Toenne
b68673f37c Fix #31369 (discussed in bug report comments). Setting the path/layer name strings of the file/layer slots of the file output node would crash, due to missing id.data pointer in the PointerRNA. Solved by using the iter->parent.id.data pointer for the RNA collection iterator. 2012-05-16 10:10:42 +00:00
Campbell Barton
e34a1fc1a5 style cleanup: imbuf 2012-05-16 09:26:37 +00:00
Lukas Toenne
a7e6d38727 Fix #31472: displace node wrong y derivative (simple typo). Credit to Ervin Weber (lusque) for the fix. 2012-05-16 09:22:59 +00:00
Campbell Barton
d82ca6d636 svn merge ^/trunk/blender -r46632:46684 2012-05-16 09:12:18 +00:00
Campbell Barton
9bcf305431 fix [#31474] Crash when object has parent and dupli_type == 'FRAMES' and show_x_ray, show_transparent are set to True
dupli objects should never be added to after-draw, added an assert to ensure this (and make fixing such bugs easier).
2012-05-16 08:42:50 +00:00
Campbell Barton
d64fd168c9 style cleanup: imbuf 2012-05-16 07:38:23 +00:00
Joshua Leung
ffd56fdae4 Bugfix [#31469] 'cyclic offset' option is broken
Removing this option from the UI. Cyclic offset and/or other the myriad of other
half-working walk/stride cycle stuff has been removed pending further review at
a later date about what's really needed, and the best way to do so with regards
to different rig types (i.e. setup antagonistic).
2012-05-16 02:40:14 +00:00
Nicholas Bishop
ed33320e3f Code cleanup: simplify standard GHash creation.
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.

GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);

Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
Campbell Barton
e79c29a1d6 style cleanup: raytree code 2012-05-15 18:45:20 +00:00
Brecht Van Lommel
7aa21d677a Python/CurveMapping: add Curve Mapping functions to add/remove curve points,
evaluate the curve and update after changes.
2012-05-15 18:34:00 +00:00
Nicholas Bishop
37552ac167 Update create_vert_edge_map() to match create_vert_poly_map(). 2012-05-15 16:32:08 +00:00
Sergey Sharybin
7b31c3c198 Fix cosmetic typos
Patch provided by Matteo F. Vescovi, thanks!
2012-05-15 16:11:04 +00:00
Sergey Sharybin
e5927b8cc5 Tomato: fixes for marker sliding operator
- Fixed crash on slide undo. Was caused by some typos in slide
  data initialization and not checking for slide action in
  cancel callback
- Always create keyframe for frame when marker is stared sliding.
2012-05-15 15:05:45 +00:00
Brecht Van Lommel
5478b21b28 Fix: mirror modifier only mirrors first UV map (IRC report). 2012-05-15 15:02:02 +00:00
Sergey Sharybin
3e4e7bfc42 Tomato: fix usage of uninitialized variables in applyAspectRatio
Thanks Keir for pointing into issue!
2012-05-15 14:44:32 +00:00
Sergey Sharybin
b5ac36671a Tomato: fixed crash when using manual calibration without GP strokes done 2012-05-15 14:01:02 +00:00
Daniel Genrich
756bf3d052 Cloth collisions:
Add repulse for near vertices. This code didn't make sense where it was before. Still leaving it also at the old place since it cannot hurt.
2012-05-15 13:46:50 +00:00
Daniel Genrich
9a8f98ddd8 Blender Internal Render: Split quads to predictable (vertices 0,1,3) triangles for animated meshes.
This solves problems with collisions beeing rendered different than in viewport.
2012-05-15 13:39:44 +00:00
Joerg Mueller
715d870bea Fix for [#31464] Crash when issuing command line render engine list ("-E help") 2012-05-15 13:32:55 +00:00