9 years agoMerging r47702 through r47726 from trunk into soc-2011-tomato
Sergey Sharybin [Mon, 11 Jun 2012 09:00:11 +0000 (09:00 +0000)]
Merging r47702 through r47726 from trunk into soc-2011-tomato

9 years agoFix applying object transform to multires objects.
Nicholas Bishop [Mon, 11 Jun 2012 08:37:35 +0000 (08:37 +0000)]
Fix applying object transform to multires objects.

Bug [#31785] Applying a transform to an object with multires weird result

Was reading interleaved coord/mask data incorrectly since paint mask
merge. Fixed by using two separate CCGKeys.

Some additional code cleanup: deduplicate multires tangent matrix

9 years ago * Blur node had some irregularities at the edge of the screen
Jeroen Bakker [Mon, 11 Jun 2012 08:28:04 +0000 (08:28 +0000)]
 * Blur node had some irregularities at the edge of the screen
 only visible when doing large size blurs.
 also solved the catcom/mitch filter that didn't work at low/medium quality

 PS never use BokehBlur Gausian filter as it is 99%+ identicat as non bokeh <= top for sergey- :)

9 years agofix for crashes in smooth-curves and clean-curves fcurve operators - missing NULL...
Campbell Barton [Mon, 11 Jun 2012 08:15:37 +0000 (08:15 +0000)]
fix for crashes in smooth-curves and clean-curves fcurve operators - missing NULL checks.

9 years agoMove all marker placement into a single omp critical section
Sergey Sharybin [Mon, 11 Jun 2012 08:06:42 +0000 (08:06 +0000)]
Move all marker placement into a single omp critical section
Could give small speadup.

9 years agoquiet 'unused' warning.
Campbell Barton [Mon, 11 Jun 2012 06:51:01 +0000 (06:51 +0000)]
quiet 'unused' warning.

9 years agoBugfix [#27886] Transform constraint maps wrongly with negative scale
Joshua Leung [Mon, 11 Jun 2012 05:05:05 +0000 (05:05 +0000)]
Bugfix [#27886] Transform constraint maps wrongly with negative scale

AFAIK, it is impossible to determine exactly which axes may have negative
scaling values from a 4x4 matrix (which is the underlying cause of this bug).
However, we can figure out if there is some negative scaling going on in that
matrix (i.e. one of the axes has negative scale). So, the fix here is to
negatively scale everything if we detect this happening.

WARNING: do not rely on being able to accurately detecting positive/negative
values for more than a single axis per bone controller. Weird results may occur.
You have been warned.

9 years agoBugfix [#31766] Mouseover Label reads 'Alt Left Arrow' when over the right
Joshua Leung [Mon, 11 Jun 2012 04:34:59 +0000 (04:34 +0000)]
Bugfix [#31766] Mouseover Label reads 'Alt Left Arrow' when over the right

Patch by Philipp Oeser

9 years agoBugfix [#28962] Changing actions via undo/delete all keyframes lacks UI refresh
Joshua Leung [Mon, 11 Jun 2012 04:13:39 +0000 (04:13 +0000)]
Bugfix [#28962] Changing actions via undo/delete all keyframes lacks UI refresh

Slightly hacky fix to get updates working for Action Editor header when there
are changes of the active action (via undo and/or deleting all keyframes at
once). Since the action referenced by the editor only gets updated when anim
channel filtering (e.g. as a result of the channel syncing operation) is
invoked. Added comments noting where these updates actually occur

9 years agoBugfix: Crash in Sequencer when trying to undo after using Grease Pencil
Joshua Leung [Mon, 11 Jun 2012 03:03:36 +0000 (03:03 +0000)]
Bugfix: Crash in Sequencer when trying to undo after using Grease Pencil

Grease Pencil data was not getting correctly relinked after file reload (for

9 years agoSVN maintenance.
Guillermo S. Romero [Mon, 11 Jun 2012 02:29:25 +0000 (02:29 +0000)]
SVN maintenance.

9 years agoCommented out expand_bones(), as this wasn't actually doing anything other than
Joshua Leung [Mon, 11 Jun 2012 02:23:26 +0000 (02:23 +0000)]
Commented out expand_bones(), as this wasn't actually doing anything other than
wasting time traversing the list of bones in the Armature

9 years agoBuild-system fix (for r.47710)
Joshua Leung [Mon, 11 Jun 2012 02:01:48 +0000 (02:01 +0000)]
Build-system fix (for r.47710)

Need add blenfont to list of include directories for sequence editor buildfiles.
Was causing build errors on OSX. Thanks Zavigny (IRC report)

9 years agoGrease Pencil Eraser - Numpad +/- and Scrollwheel Up/Down to change radius of
Joshua Leung [Mon, 11 Jun 2012 01:27:56 +0000 (01:27 +0000)]
Grease Pencil Eraser - Numpad +/- and Scrollwheel Up/Down to change radius of
brush while erasing

This makes it easier to change the size of the brush without having to jump out
to the User Preferences and back

9 years agoGrease Pencil - Eraser is drawn with the circle/brush indicator again
Joshua Leung [Mon, 11 Jun 2012 01:09:25 +0000 (01:09 +0000)]
Grease Pencil - Eraser is drawn with the circle/brush indicator again

9 years agoCode cleanup - Removing/commenting out various bits of legacy cruft related to
Joshua Leung [Mon, 11 Jun 2012 00:46:22 +0000 (00:46 +0000)]
Code cleanup - Removing/commenting out various bits of legacy cruft related to
old Grease Pencil stuff

9 years agoGrease Pencil - Support for Grease Pencil in the Sequence Editor preview/image
Joshua Leung [Mon, 11 Jun 2012 00:21:50 +0000 (00:21 +0000)]
Grease Pencil - Support for Grease Pencil in the Sequence Editor preview/image
space works again

This commit restores the support for using Grease Pencil in the Sequence Editor
image preview region, making it possible to scribble on footage for review
purposes again. Due to internal changes in how the Sequencer handles the image
drawing for this stuff (i.e. it is now fully based on View2D instead of trying
to implement its own little crazy offset+zoom stuff), a lot of the old code for
handling those offsets is no longer needed. Instead, one of the "standard" cases
is now used, and works quite well.

* View-space Grease Pencil drawing was done in wrong place (before view2d
* Grease Pencil entry in RNA had wrong/missing type

* DingTo - initial patch/attempt at restoring support
* Aligorith - solved the "offset problems"

9 years agoOUTLINER_OT_material_drop -- Drag & Drop materials onto objects in the outliner
Dan Eicher [Sun, 10 Jun 2012 22:22:26 +0000 (22:22 +0000)]
OUTLINER_OT_material_drop -- Drag & Drop materials onto objects in the outliner

Adds the material at materials + 1 unlike the DnD view3d one which replaces the first one

9 years agostyle cleanup
Campbell Barton [Sun, 10 Jun 2012 22:13:17 +0000 (22:13 +0000)]
style cleanup

9 years agofix [#31712] User prefs Input: Filter searches for names starting with entered phrase...
Campbell Barton [Sun, 10 Jun 2012 21:38:24 +0000 (21:38 +0000)]
fix [#31712] User prefs Input: Filter searches for names starting with entered phrase only

9 years agocorrect float vector sizes
Campbell Barton [Sun, 10 Jun 2012 20:31:01 +0000 (20:31 +0000)]
correct float vector sizes

9 years agoquiet warning
Campbell Barton [Sun, 10 Jun 2012 20:20:37 +0000 (20:20 +0000)]
quiet warning

9 years agocorrect freeing C++ arrays.
Campbell Barton [Sun, 10 Jun 2012 20:14:15 +0000 (20:14 +0000)]
correct freeing C++ arrays.

9 years agosvn merge ^/trunk/blender -r47698:47701
Campbell Barton [Sun, 10 Jun 2012 20:01:48 +0000 (20:01 +0000)]
svn merge ^/trunk/blender -r47698:47701

9 years agostyle cleanup
Campbell Barton [Sun, 10 Jun 2012 19:59:02 +0000 (19:59 +0000)]
style cleanup

9 years agoCommitting patch [#31704] "Patch to fix keyboard sensor from blocking quit game key...
Mitchell Stokes [Sun, 10 Jun 2012 19:32:57 +0000 (19:32 +0000)]
Committing patch [#31704] "Patch to fix keyboard sensor from blocking quit game key binding" by Jay Parker. This patch fixes [#31671] "Keyboard Sensor blocks Quit Game Key Binding"

9 years agoMerging r47691 through r47698 from trunk into soc-2011-tomato
Sergey Sharybin [Sun, 10 Jun 2012 18:47:36 +0000 (18:47 +0000)]
Merging r47691 through r47698 from trunk into soc-2011-tomato

9 years agoMake keying clamping operation complex so it might directly access input buffer
Sergey Sharybin [Sun, 10 Jun 2012 18:15:28 +0000 (18:15 +0000)]
Make keying clamping operation complex so it might directly access input buffer

Seems to give quite noticeable speedup, but there's sometimes strange artifacts
showing as darker lines placed in along some kind of tiles.
Not sure what causes them yet.

9 years agoAdd screen balance into interface
Sergey Sharybin [Sun, 10 Jun 2012 17:41:04 +0000 (17:41 +0000)]
Add screen balance into interface

Could be helpful to be played around. Default value is 0.5,
Most probably this default value should be set manually for
older files.

9 years agoAlso fix cache line in clip editor which didn't take start frame into account.
Sergey Sharybin [Sun, 10 Jun 2012 17:24:05 +0000 (17:24 +0000)]
Also fix cache line in clip editor which didn't take start frame into account.

9 years agoFixed curves and dopeseet views of motion tracking data not taking clip's
Sergey Sharybin [Sun, 10 Jun 2012 17:09:35 +0000 (17:09 +0000)]
Fixed curves and dopeseet views of motion tracking data not taking clip's
start frame into account.

9 years agoForce multires update when changing subdivision type.
Nicholas Bishop [Sun, 10 Jun 2012 17:06:26 +0000 (17:06 +0000)]
Force multires update when changing subdivision type.

Fixes bug [#31050] Changing multires subdivision algorithm can ruin mesh

9 years agoCode cleanups for the PBVH, no functional changes.
Nicholas Bishop [Sun, 10 Jun 2012 16:37:22 +0000 (16:37 +0000)]
Code cleanups for the PBVH, no functional changes.

* Use the PBVHType consistently in pbvh_update_draw_buffers().

* Split the raycast function up, mesh and grid raycast get their own
  functions now.

* Replace duplicated code in BLI_pbvh_node_add_proxy() with call to

9 years agoMerging r47683 through r47690 from trunk into soc-2011-tomato
Sergey Sharybin [Sun, 10 Jun 2012 16:26:00 +0000 (16:26 +0000)]
Merging r47683 through r47690 from trunk into soc-2011-tomato

9 years agoBugfix for autosmooth in sculpt mode.
Nicholas Bishop [Sun, 10 Jun 2012 16:22:58 +0000 (16:22 +0000)]
Bugfix for autosmooth in sculpt mode.

This option was broken for non-multires meshes (not sure for how
long), as the pmap was not getting calculated.

Added a more general check for whether the pmap is needed, also added
an assert to warn about this in future.

9 years agoFix compilation without libmv
Sergey Sharybin [Sun, 10 Jun 2012 16:16:02 +0000 (16:16 +0000)]
Fix compilation without libmv

9 years agoMerging r47677 through r47683 from trunk into soc-2011-tomato
Sergey Sharybin [Sun, 10 Jun 2012 16:09:03 +0000 (16:09 +0000)]
Merging r47677 through r47683 from trunk into soc-2011-tomato

9 years agoBump subversion so iteration through all markers would happen
Sergey Sharybin [Sun, 10 Jun 2012 15:28:37 +0000 (15:28 +0000)]
Bump subversion so iteration through all markers would happen
only for old files which actually needs to be ported to 4 corners

9 years agoCommit patch from Stephan Kassemeyer sent to ML
Sergey Sharybin [Sun, 10 Jun 2012 15:28:29 +0000 (15:28 +0000)]
Commit patch from Stephan Kassemeyer sent to ML

This patch aims to solve unaligned operation assert
happens in Eigen library.

This is short-term solution which in fact shall be reverted
as soon as real solution would be added to Ceres. Meanwhile
this should be acceptable to have for a while.

9 years agoPlanar tracking support for motion tracking
Sergey Sharybin [Sun, 10 Jun 2012 15:28:19 +0000 (15:28 +0000)]
Planar tracking support for motion tracking

Major list of changes done in tomato branch:

- Add a planar tracking implementation to libmv
  This adds a new planar tracking implementation to libmv. The
  tracker is based on Ceres[1], the new nonlinear minimizer that
  myself and Sameer released from Google as open source. Since
  the motion model is more involved, the interface is
  different than the RegionTracker interface used previously
  in Blender.

  The start of a C API in libmv-capi.{cpp,h} is also included.

- Migrate from pat_{min,max} for markers to 4 corners representation

  Convert markers in the movie clip editor / 2D tracker from using
  pat_min and pat_max notation to using the a more general, 4-corner

  There is still considerable porting work to do; in particular
  sliding from preview widget does not work correct for rotated

  All other areas should be ported to new representation:

  * Added support of sliding individual corners. LMB slide + Ctrl
    would scale the whole pattern
  * S would scale the whole marker, S-S would scale pattern only
  * Added support of marker's rotation which is currently rotates
    only patterns around their centers or all markers around median,

    Rotation or other non-translation/scaling transformation of search
    area doesn't make sense.

  * Track Preview widget would display transformed pattern which
    libmv actually operates with.

- "Efficient Second-order Minimization" for the planar tracker

  This implements the "Efficient Second-order Minimization"
  scheme, as supported by the existing translation tracker.
  This increases the amount of per-iteration work, but
  decreases the number of iterations required to converge and
  also increases the size of the basin of attraction for the

- Remove 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.

    Not exposed into interface yet/

  * 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.

- Replace 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
        * Perspective

  * 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.

- Add light-normalized tracking

  Added the ability to normalize patterns by their average value while
  tracking, to make them invariant to global illumination changes.

Additional details could be found at wiki page [2]


9 years agoInitial Ceres integration into Blender
Sergey Sharybin [Sun, 10 Jun 2012 15:27:41 +0000 (15:27 +0000)]
Initial Ceres integration into Blender

Currently only put sources of Ceres library into extern/libmv/third_party and
setup CMake and SCons building systems.

Integration details:

- Even CMake build files are not re-used from Ceres's trunk: they're using some
  automatic stuff detection like glog, pthreads, protobuf and so and it's not
  so clear how to re-use that files without modifications.
  And IMO it's easier if build files are getting re-generated automatically to
  match Blender-specific setup rather than keeping changes made locally in
  Blender in sync when re-bundling Ceres library. Especially in case when it's
  already needed to support SCons build system.
- Integrated only actual sources, all tests were stripped. Probably it'll be nice
  to have them, but they'll need clear integration with current module test stuff
  in Blender.
- Suitesparse was disabled. It'll help a lot having it, but there are some difficulties
  making cholmod working fine on windows. Would be added in future
- was also stripped. It's not used by Ceres's upstream and
  it gives compilation error (undefined uint32 -- looks like namespace issue).
- Currently all schur eliminators are included. Not sure if it makes sense,
  also not sure if it makes sense having them switchable on and off -- IMO better
  to have single configuration which works and does not require special tweaks
  after everything was set up.

To bundle updated version of Ceres:
- Go to extern/libmv/third_party/ceres folder
- Run ./

This will checkout fresh Ceres snapshot of Windows branch (which is currently
most interesting from integration into Blender POV), apply all patches listed
in patches/series and copy needed files into Blender's working copy. This will
also re-generate CMake/SCons build rules.

If you'll need extra files from Ceres repository which are not present in
Blender, you'll need to copy them manually and then run ./ from
extern/libmv/third_party/ceres folder which will update list of files used
by Blender.

Thanks to Leir Mierle and Sameer Agarwal (and all others who helped developing
Ceres) this library and thanks to Keir Mierle with help integrating it into Blender!

9 years agoSupport for per-track Grease Pencil datablocks for motion tracking
Sergey Sharybin [Sun, 10 Jun 2012 15:26:50 +0000 (15:26 +0000)]
Support for per-track Grease Pencil datablocks for motion tracking

Originally was needed to reach easy way of defining masks used for tracking
(do eliminate textures which doesn't belong to feature when tracking.

Implemented as alternative to GP datablock for clip and added switch between
per-clip and per-track GP datablocks -- internal limitations of GP doesn't
allow to display all GP datablocks easily.  So either you see.edit GP associated
with clip or with track.

GP strokes associated with track are relative to track's position, following
tracks during tracking and could be shared between several tracks.

Masking code presents in libmv and there's rasterizer of GP datablocks for
masks in blender's tracking module, but they still need to be glued together.

Some documentation cound be found at this page:

9 years agostyle cleanup: use capital camel case names for typedef's
Campbell Barton [Sun, 10 Jun 2012 15:20:10 +0000 (15:20 +0000)]
style cleanup: use capital camel case names for typedef's

9 years agoFix #31778. BKE_image_user_frame_calc can be called with iuser==NULL in some circumst...
Lukas Toenne [Sun, 10 Jun 2012 15:07:08 +0000 (15:07 +0000)]
Fix #31778. BKE_image_user_frame_calc can be called with iuser==NULL in some circumstances now, so needs to check that.

9 years agochange RNA_struct_find_function to accept a type rather then a PointerRNA, add a...
Campbell Barton [Sun, 10 Jun 2012 13:34:59 +0000 (13:34 +0000)]
change RNA_struct_find_function to accept a type rather then a PointerRNA, add a check duplicate functions are not defined.

9 years agoRemove old preset which was corrected to Nicok D3S
Sergey Sharybin [Sun, 10 Jun 2012 13:25:04 +0000 (13:25 +0000)]
Remove old preset which was corrected to Nicok D3S

9 years agoMerging r47674 through r47676 from trunk into soc-2011-tomato
Sergey Sharybin [Sun, 10 Jun 2012 12:37:41 +0000 (12:37 +0000)]
Merging r47674 through r47676 from trunk into soc-2011-tomato

9 years agoMerging r47669 through r47673 from trunk into soc-2011-tomato
Sergey Sharybin [Sun, 10 Jun 2012 12:33:30 +0000 (12:33 +0000)]
Merging r47669 through r47673 from trunk into soc-2011-tomato

9 years agomango request - add alpha to histogram & sample line.
Campbell Barton [Sun, 10 Jun 2012 12:33:27 +0000 (12:33 +0000)]
mango request - add alpha to histogram & sample line.

9 years agoSynchronize changes with trunk
Sergey Sharybin [Sun, 10 Jun 2012 12:31:07 +0000 (12:31 +0000)]
Synchronize changes with trunk

9 years agoSynchronize changes with tomato branch
Sergey Sharybin [Sun, 10 Jun 2012 12:30:47 +0000 (12:30 +0000)]
Synchronize changes with tomato branch

9 years agoApplied and completed a compositor patch by Brecht to use signalling and waiting...
Lukas Toenne [Sun, 10 Jun 2012 12:26:33 +0000 (12:26 +0000)]
Applied and completed a compositor patch by Brecht to use signalling and waiting in scheduling and worker threads instead of continuous loops with sleep times. This should help reduce unnecessary wait times in Tile.

9 years agoSomehow this files were missed in one of merges
Sergey Sharybin [Sun, 10 Jun 2012 12:23:44 +0000 (12:23 +0000)]
Somehow this files were missed in one of merges

9 years agoMerging r47667 through r47668 from trunk into soc-2011-tomato
Sergey Sharybin [Sun, 10 Jun 2012 12:19:14 +0000 (12:19 +0000)]
Merging r47667 through r47668 from trunk into soc-2011-tomato

9 years agoMerging r47662 through r47666 from trunk into soc-2011-tomato
Sergey Sharybin [Sun, 10 Jun 2012 12:15:39 +0000 (12:15 +0000)]
Merging r47662 through r47666 from trunk into soc-2011-tomato

9 years agomango request
Campbell Barton [Sun, 10 Jun 2012 12:09:25 +0000 (12:09 +0000)]
mango request
- optionally display the histogram as lines (not filled areas).
- expand the enum for faster access.
- keep the sample line displayed after doing the line sample (running again clears).

9 years agocode cleanup: rename flag --> dflag (draw flag), since this is overly generic name...
Campbell Barton [Sun, 10 Jun 2012 10:15:49 +0000 (10:15 +0000)]
code cleanup: rename flag --> dflag (draw flag), since this is overly generic name and was passed about to many functions.

9 years agoMerging r47624 through r47661 from trunk into soc-2011-tomato
Sergey Sharybin [Sun, 10 Jun 2012 09:44:26 +0000 (09:44 +0000)]
Merging r47624 through r47661 from trunk into soc-2011-tomato

9 years agoFix for Tile group nodes with internally unconnected outputs, this was crashing due...
Lukas Toenne [Sun, 10 Jun 2012 09:30:31 +0000 (09:30 +0000)]
Fix for Tile group nodes with internally unconnected outputs, this was crashing due to missing constant value operations for such outputs. The SocketProxyNode now checks connection of the input socket on conversion, so this also simplifies usage of proxy nodes quite a bit.

9 years agofix for un-initialized memory use for modal inset/bevel.
Campbell Barton [Sun, 10 Jun 2012 09:05:49 +0000 (09:05 +0000)]
fix for un-initialized memory use for modal inset/bevel.

9 years agoMissed NULL-pointer checks in poll some functions
Sergey Sharybin [Sun, 10 Jun 2012 09:04:49 +0000 (09:04 +0000)]
Missed NULL-pointer checks in poll some functions

9 years agoFix for compositor image node draw function. The image user pointer needs to be const...
Lukas Toenne [Sun, 10 Jun 2012 07:51:57 +0000 (07:51 +0000)]
Fix for compositor image node draw function. The image user pointer needs to be constructed explicitly from the node storage pointer.

9 years agoFix #31747, broken image sequence loading after r47432.
Lukas Toenne [Sun, 10 Jun 2012 07:35:45 +0000 (07:35 +0000)]
Fix #31747, broken image sequence loading after r47432.

The image file name function was updating the iuser->framenr using a supposed cfra parameter. However, the actual cfra is unknown when loading movies or sequences, so the iuser->framenr value itself was passed in its place, leading to incremental addition of the iuser frame offset. Removed the cfra parameter altogether from the image path function. This should instead be done separately if necessary, it's not an inherent part of constructing the image file name.

9 years agoremove duplicate import
Campbell Barton [Sun, 10 Jun 2012 00:22:18 +0000 (00:22 +0000)]
remove duplicate import

9 years agoOBJECT_OT_drop_named_material -- missing notifier for material panel UI update
Dan Eicher [Sat, 9 Jun 2012 21:43:22 +0000 (21:43 +0000)]
OBJECT_OT_drop_named_material -- missing notifier for material panel UI update

9 years agocode cleanup: reduce float/double promotion
Campbell Barton [Sat, 9 Jun 2012 19:57:14 +0000 (19:57 +0000)]
code cleanup: reduce float/double promotion

9 years agoChange libmv's bilinear sampling to assume the same pixel
Keir Mierle [Sat, 9 Jun 2012 19:22:39 +0000 (19:22 +0000)]
Change libmv's bilinear sampling to assume the same pixel
conventions as Blender. This fixes the preview widget, and
should make tracking slightly more accurate.

9 years agoAdd new warp regularization scheme for planar tracking.
Keir Mierle [Sat, 9 Jun 2012 18:58:51 +0000 (18:58 +0000)]
Add new warp regularization scheme for planar tracking.

This adds a new term to the tracking cost function that
restricts how much the optimizer can warp the patch (as
opposed to merely adjusting the translation). This should
reduce the "jumpiness" that is sometimes seen when doing
non-"Loc" tracks.

It is disabled in this commit; a subsequent commit will add
controls to the tracking dialog for this.

9 years agostyle cleanup: assignment & indentation.
Campbell Barton [Sat, 9 Jun 2012 18:56:12 +0000 (18:56 +0000)]
style cleanup: assignment & indentation.

9 years agoFormatting fixes in Ceres.
Keir Mierle [Sat, 9 Jun 2012 18:45:54 +0000 (18:45 +0000)]
Formatting fixes in Ceres.

9 years agoLooks like some kind of merge error happened here which i didn't notice. Corrected!
Sergey Sharybin [Sat, 9 Jun 2012 18:26:26 +0000 (18:26 +0000)]
Looks like some kind of merge error happened here which i didn't notice. Corrected!

9 years agocode cleanup: removed/renamed shadow & duplicate variable definitions.
Campbell Barton [Sat, 9 Jun 2012 18:20:40 +0000 (18:20 +0000)]
code cleanup: removed/renamed shadow & duplicate variable definitions.

9 years agoActually that was an error in on of test formulas. Stick back to original one.
Sergey Sharybin [Sat, 9 Jun 2012 18:19:41 +0000 (18:19 +0000)]
Actually that was an error in on of test formulas. Stick back to original one.

9 years agocode cleanup: quiet all warnings about double promotion (either by changing the type...
Campbell Barton [Sat, 9 Jun 2012 17:45:22 +0000 (17:45 +0000)]
code cleanup: quiet all warnings about double promotion (either by changing the type or explicitly casting).

9 years agostyle cleanup: block comments
Campbell Barton [Sat, 9 Jun 2012 17:22:52 +0000 (17:22 +0000)]
style cleanup: block comments

9 years agoChanges to keying nodes:
Sergey Sharybin [Sat, 9 Jun 2012 17:15:38 +0000 (17:15 +0000)]
Changes to keying nodes:

- Replace FastGaussian blur with GaussianBokeh blur which should give better results.
- Changes a bit formula of saturation which in some cases gives better result.
  Also included (commented out) original formula which was also checked by Brecht
  and which gave better result in some other cases.
- Made clipping white/black temporal dependent, so hopefully it wouldn't destroy
  gradients on edges.

9 years agofix for un-handled exception when entering in multiple values to a button, floats...
Campbell Barton [Sat, 9 Jun 2012 16:45:42 +0000 (16:45 +0000)]
fix for un-handled exception when entering in multiple values to a button, floats were not correctly checked for.

9 years agoFixed crash in previous commit when track preview is drawing for missed frame
Sergey Sharybin [Sat, 9 Jun 2012 11:34:22 +0000 (11:34 +0000)]
Fixed crash in previous commit when track preview is drawing for missed frame

9 years agoHomography correction for track preview widget
Sergey Sharybin [Sat, 9 Jun 2012 11:14:36 +0000 (11:14 +0000)]
Homography correction for track preview widget

Use homography transformation for pattern displayed in track preview widget.
Sampling of this pattern happens to resolution of preview widget itself,
which implied some bigger changes in how scopes are working:

- Instead of real pattern store search area in BKE_movieclip_update_scopes,
  which is later used for sampling pattern.
- Sampling of pattern happens in ui_draw_but_TRACKPREVIEW from search area
  which allows to sample it to actual resolution of preview widget.
- If size of preview widget is not changing, this sampled pattern wouldn't
  be re-sampled until scopes are tagged to update.

There are some issues with pattern sampling which seems to happen SamplePlanarPatch,
changing linear sampling to nearest removes that unwanted 1px offset.

Left commented saving of sampled image in ui_draw_but_TRACKPREVIEW which should
help figuring the issue out.

9 years agoPlanar tracker polish.
Keir Mierle [Sat, 9 Jun 2012 06:55:21 +0000 (06:55 +0000)]
Planar tracker polish.

- Fixes the correlation checking code that was broken in the
  previous commit. The bug was a transpose error.
- Fixes a memory leak of the warp functor, found by Sameer.
- Various cleanups done at Sameer's suggestion.

Thanks to Sameer Agarwal for a code review.

9 years agocode cleanup: doxy comment filename corrections
Campbell Barton [Fri, 8 Jun 2012 23:43:11 +0000 (23:43 +0000)]
code cleanup: doxy comment filename corrections

9 years agoadd a utility function to get an exact match for a grease pencil frame.
Campbell Barton [Fri, 8 Jun 2012 22:07:57 +0000 (22:07 +0000)]
add a utility function to get an exact match for a grease pencil frame.

9 years agorna_SequenceElements_pop --> use memcpy instead of strcpy
Dan Eicher [Fri, 8 Jun 2012 22:05:26 +0000 (22:05 +0000)]
rna_SequenceElements_pop --> use memcpy instead of strcpy

9 years agocode cleanup: name mask and grease pencil dope sheet editor functions more consistantly
Campbell Barton [Fri, 8 Jun 2012 21:48:04 +0000 (21:48 +0000)]
code cleanup: name mask and grease pencil dope sheet editor functions more consistantly

9 years agoconstraints names are not matching (rna and constraint.c). doing rna->constraint.c
Dalai Felinto [Fri, 8 Jun 2012 21:04:48 +0000 (21:04 +0000)]
constraints names are not matching (rna and constraint.c). doing rna->constraint.c

9 years agoCycles / Cleanup:
Thomas Dinges [Fri, 8 Jun 2012 20:17:02 +0000 (20:17 +0000)]
Cycles / Cleanup:
* All references to old textures should now be finally removed.

9 years agoFixing a BGE bug where textures could get loaded into VRAM twice.
Mitchell Stokes [Fri, 8 Jun 2012 19:57:28 +0000 (19:57 +0000)]
Fixing a BGE bug where textures could get loaded into VRAM twice.

9 years agoCycles / Textures:
Thomas Dinges [Fri, 8 Jun 2012 19:57:25 +0000 (19:57 +0000)]
Cycles / Textures:
* Some code cleanup, removed old enums, which are not used anymore.
* Some renaming for consistency and to match new texture names.

9 years agoCycles / Code Cleanup:
Thomas Dinges [Fri, 8 Jun 2012 19:21:12 +0000 (19:21 +0000)]
Cycles / Code Cleanup:
* Removed a workaround for the NodeType enum, uses consecutive values now.

I could not find issues with CUDA, when compiling with Toolkit 4.2 (all sm kernels) and regression files rendered fine on my GPU with sm_21.

9 years agoMerging r47612 through r47623 from trunk into soc-2011-tomato
Sergey Sharybin [Fri, 8 Jun 2012 18:25:01 +0000 (18:25 +0000)]
Merging r47612 through r47623 from trunk into soc-2011-tomato

9 years agoFixed issue with missed reconstruction error in clip editor header
Sergey Sharybin [Fri, 8 Jun 2012 18:16:20 +0000 (18:16 +0000)]
Fixed issue with missed reconstruction error in clip editor header

Actually was causes by error in RNA bindings which lead to empty reconstruction
returned for cameraObject.reconstruction.

9 years agoMake planar tracking much faster.
Keir Mierle [Fri, 8 Jun 2012 17:42:17 +0000 (17:42 +0000)]
Make planar tracking much faster.

- This makes planar tracking around 2-3x or more faster than
  before, by rearranging how the sampling is done.
  Previously, the source patch was sampled repeatedly on
  every optimizer iteration; this was done for
  implementation speed, but was wasteful in computation.

- This also contains some additions to Ceres to help
  deailing with mixed numeric / automatic differentation. In
  particular, there is now a "Chain::Rule" operator that
  facilitates calling a function that takes Jet arguments,
  yet does numeric derivatives internally. This is used to
  mix the numeric differentation of the images with the warp
  parameters, passed as jets by Ceres to the warp functor.

  There is also a new "JetOps" object for doing operations
  on types which may or may not be jets, such as scaling
  the derivative part only, or extracting the scalar part
  of a jet.

  The Ceres patches are aimed at upstream.

- A new function for sampling a patch is now part of the
  track_region.h API; this will get used to make the preview
  widget properly show what is getting tracked. Currently
  the preview widget does not handle perspective tracks.

Known issues:

  This patch introduces a bug such that the "Minimum
  Correlation" flag does not work; if it is enabled, tracking
  aborts immediately. The workaround for now is to disable the
  correlation checking, and examine your tracks carefully. A
  fix will get added shortly.

9 years agoFixed issue with non-updating frame in clip editor when toggling undistorted render...
Sergey Sharybin [Fri, 8 Jun 2012 17:16:32 +0000 (17:16 +0000)]
Fixed issue with non-updating frame in clip editor when toggling undistorted render while frame is grayscaled.

Also corrected some typos in movieclip.

9 years agoAdded a default case in switch to avoid paranoid compiler warnings.
Lukas Toenne [Fri, 8 Jun 2012 17:02:02 +0000 (17:02 +0000)]
Added a default case in switch to avoid paranoid compiler warnings.

9 years agoSelecting track channel in tracking dopesheet would make track active,
Sergey Sharybin [Fri, 8 Jun 2012 16:51:38 +0000 (16:51 +0000)]
Selecting track channel in tracking dopesheet would make track active,
just as it happens with curve view.

9 years agoAdded sorting by average reprojection error to motion tracking dopesheet.
Sergey Sharybin [Fri, 8 Jun 2012 16:42:24 +0000 (16:42 +0000)]
Added sorting by average reprojection error to motion tracking dopesheet.

9 years agoParticle Info node for Cycles. This can be used to access particle information in...
Lukas Toenne [Fri, 8 Jun 2012 16:17:57 +0000 (16:17 +0000)]
Particle Info node for Cycles. This can be used to access particle information in material shaders for dupli objects. For now only the particle Age and individual Lifetime (in frames) are supported, more attributes can be added when needed.

The particle data is stored in a separate texture if any of the dupli objects uses particle info nodes in shaders. To map dupli objects onto particles the store an additional particle_index value, which is different from the simple dupli object index (only visible particles, also works for particle dupli groups mode).

Some simple use cases on the blog:

9 years agoUpdate Bullet to version 2.80 (bullet svn revision 2537)
Sergej Reich [Fri, 8 Jun 2012 16:13:01 +0000 (16:13 +0000)]
Update Bullet to version 2.80 (bullet svn revision 2537)

Remove Jamfiles and other unused files that stuck around during previous updates.

Add patches for local changes to the patches directory.

Update readme.txt, it had outdated infromation.

9 years agoDon't show physics properties in game engine conext
Sergej Reich [Fri, 8 Jun 2012 15:24:28 +0000 (15:24 +0000)]
Don't show physics properties in game engine conext

Also rename fluid panels to be more consistent with other simulations

9 years agoFix #31752: Select All By Layer seems not to work when object belongs to several...
Sergey Sharybin [Fri, 8 Jun 2012 15:14:45 +0000 (15:14 +0000)]
Fix #31752: Select All By Layer seems not to work when object belongs to several layers

Added option which changes match policy from exact match and shared layers when
selecting objects by layer.