Commit Graph

562 Commits

Author SHA1 Message Date
c8975c4375 style cleanup 2012-10-30 12:18:45 +00:00
b4642d203d Fix #32979: proportional edit connected was too slow with many vertices on
some meshes, now use the system qsort instead of a custom one (which I guess
suffered from poor choice of pivot point in some cases).
2012-10-27 18:54:45 +00:00
e903701450 style cleanup 2012-10-27 01:46:47 +00:00
c9dade4fe0 Big i18n commit: add "reports" from bmesh/readfile/tracking/dynapaint (and a few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()... 2012-10-26 17:32:50 +00:00
0e494b74c4 style cleanup 2012-10-26 04:14:10 +00:00
c93978d445 code cleanup: some edits for unused vars in recent smooth addition and some style edits. 2012-10-24 11:31:57 +00:00
d273ddfd4f Bugfix 30974
- Disabled "Quick Cache" option. It was causing ridiculous updates
  on the entire animation system for start-end frame on every user
  event causing changes here (like during transform). Worst was that you
  couldn't transform animated objects for that reason either.

  Most of the code is still there, waiting for a moment to revise it...

- Constraint "Follow Track" (marker) wasn't using inverse matrix code
  in transform, making it wacko to use (wrong pivot, crazyspace)
2012-10-23 14:07:32 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
ffd98941b5 Support for connected style proportional editing in UV editor. Now when connected proportional editing is on, only UVs on the same island will be proportionally moved. The implementation simply rejects UVs whose island does not belong to islands of selected vertices and decrements the total count of transform elements appropriately. Memory usage could be better but it would require some more preprocessing. 2012-10-22 07:29:38 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
e8872a8ea2 style cleanup: if(); 2012-10-07 09:48:59 +00:00
35ae7dae9e fix for own bug in bmesh api, setting a byte string customdata layer assumed the input data was 256 length, assigning smaller values would read past the buffer. 2012-10-01 15:39:29 +00:00
41965e197c - transform's createTransCurveVerts was using both CTX_data_edit_object(C) and t->obedit, now only use t->obedit.
- freeing bez-triple handle data was being done in a loop for many types which don't support bezier handle data.
2012-09-28 14:51:33 +00:00
953e2321dd fix for memory leak grabbing masks and grease pencil in the dope sheet. (also NULL after freeing) 2012-09-24 01:50:26 +00:00
25c96bc9f3 code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +00:00
0d5d2146eb code cleanup: make shape key api names consistent with our new convention. 2012-09-19 10:12:07 +00:00
4ea7193ccf code cleanup: marker transform was doing some redundant/misleading assignments & checks, remove unused cruft.
also remove some other redundant checks.
2012-09-19 01:34:10 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
e74701fbfc node transform was using PET mode (drawing a circle - but it did nothing), disable PET for nodes. 2012-09-14 01:28:26 +00:00
62adcad9bd fix [#32444] Proportional Edit stays on on Pose Mode, after activating it in Object Mode.
disable PET in posemode.
2012-09-11 23:37:17 +00:00
a0ae47f06c add some missing NULL checks, a few parts of the code used a pointer then checked it for NULL after.
also made it more clear that some areas assume the pointer isnt null (remove redundant NULL checks).
2012-09-11 02:18:27 +00:00
09af2fecfb Silencing compiler warning (use of undefined value) 2012-08-30 14:09:50 +00:00
52310bd4a7 code cleanup: remove dead assignments, gave mask vars clearer names & moved some mask evaluation funcs into mask_evaluate.c 2012-08-26 18:09:01 +00:00
2536362f79 Sequencer: reshuffle overlapping strips on cancel trasnform
It was possible to create overlapped strips by duplicating and
cancelling transform, now it sohuld be handled properly.
2012-08-24 16:09:48 +00:00
26f073b327 macros for rectangle center and size 2012-08-20 15:29:02 +00:00
1bf893e9c8 Code cleanup: BKE_ prefix for public sequencer functions 2012-08-08 11:15:40 +00:00
8ae89f4942 speedup to inpaint node in my tests was about ~30% for an optimized build.
also replace MIN/MAX2 with inline functions in transform.
2012-08-07 09:20:30 +00:00
731c6ebec4 Patch [#32246] (Bugfix): UV editor -> "Proportional edit" together with "constrain to bounds" does not work.
Patch reviewed by Campbell Barton. Thanks!
2012-08-06 13:40:29 +00:00
3b743582ec node transform for frames was broken since the frames locx, locy are used as offsets, now node transform uses node ccenters (works nicer for regular nodes too). 2012-08-06 09:08:24 +00:00
7d2190b79b fix for transforming parented nodes, the node would check its parent was not transformed, but in fact its parents parent could still be getting transformed still, also, the order of initializing transform data made this check unreliable.
fix for mingw broke from one of my own commits, changing header order fixes.
2012-08-05 21:06:56 +00:00
685592f9d9 fix for transforming parented nodes (parent relative offset wasn't taken into account) 2012-08-05 20:16:14 +00:00
84df85164d fullscreen mask editing now works in the image space over a viewer node. 2012-08-03 20:56:04 +00:00
ff078d309e change clip utility function arguments to take space data and region rather then the context.
this allows a fix to be applied that corrects the helper line in the image view when transforming a mask.
2012-07-26 22:41:40 +00:00
4c2de5e0c7 fix some types and incorrect info 2012-07-26 17:41:09 +00:00
927af4ccc9 mask transform now works in the image space 2012-07-25 19:36:59 +00:00
7fba5779ed match function names for clip/image spaces 2012-07-25 16:30:53 +00:00
f83ea3fa85 fix some crashes with mask/image transfor, a few more areas working now. 2012-07-25 16:03:08 +00:00
df107939c9 rename BLI_getQuotedStr --> BLI_str_quoted_substrN to make it more clear its doing an allocation. 2012-07-09 22:16:50 +00:00
3a0593cc3d code cleanup: dont use function calls like dot_v3v3, pow and sqrt within macros which results in calling the function multiple times needlessly.
also added some comments.
2012-07-06 22:48:28 +00:00
Lukas Toenne
83093d6770 Extended modes for snapping in the node editor.
The transform operators in nodes will now use the unselected nodes to generate snapping points. Unlike object snapping, node snapping works for the x/y axes separately and snaps node borders to same borders of unselected nodes. The sensitive area for node borders extends over the whole view2D range, to enable simple alignment of nodes in both x and y direction.

For snap points in the node editor an additional enum value is stored to indicate the type of node border (left/right/top/bottom). This works as a constraint on possible node alignments: only same border types align with each other.
2012-06-29 14:34:46 +00:00
bf19327465 fix for checking wrong flag with removing mask shape keys doubles on the dope sheet. 2012-06-26 08:25:17 +00:00
01dea9ff85 Fixed crash when trying to perform transformation in Clip Editor without clip opened
Reported by JumboCoDeC in IRC. Thanks for the report.
2012-06-25 19:48:05 +00:00
4b955a60ed Cleanup up space clip API:
- Remove clip/mask specific size/aspect getters, they shall just
  use the same size/aspect ratio.
- Made size getter (and some other public functions) accept context
  instead of SpaceClip. Currently only SpaceClip is being get from
  this context, but later it'll be helpful when adding support of
  editing mask without opening clip in clip editor (in this case
  using render resolution for mask would be ideal, but this
  requires knowing scene in size getter).
- Rearrange some functions in clip_editor.c for easier navigation
  in the file.
2012-06-20 10:28:51 +00:00
4f044f4ec1 Changes in clip editor's public api to make it's more clear
whether getting of some property happens or this property is
being changed.

Also made it more clear whether affecting property belongs
to clip or mask datablock.
2012-06-19 14:26:29 +00:00
f0c724219d Internal refactoring of tracking module, should be no functional changes
- Re-arrange functions in headers and implementation file to make them
  more grouped by entity they're operating with. Also order of functions
  in implementation file should match order of functions in header for
  easier navigation.

- Rename some functions to match conventions of naming public functions.
- Some code de-duplication, still some room for improvements tho.
- Split main 2D tracking functions into smaller steps to make it more clear.

Accidentally OpenMP was disabled in some of previous commits, re-enable it.
2012-06-15 11:03:23 +00:00
869efe927c style cleanup 2012-06-10 22:13:17 +00:00
51d9bf725d style cleanup 2012-06-10 19:59:02 +00:00
25bb441301 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
  representation.

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

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

- 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]

  [1] http://code.google.com/p/ceres-solver
  [2] http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Motion_Tracker
2012-06-10 15:28:19 +00:00
b33c5168f4 mask animation keys now editable in the dope sheet (duplicate, transform, delete, select- etc). 2012-06-08 14:31:38 +00:00
105b1031dd code cleanup: rename sequencer types to SEQ_TYPE_*** and use enums rather then defines. 2012-06-07 15:49:02 +00:00