Commit Graph

485 Commits

Author SHA1 Message Date
b0fb857ef2 fix [#32684] Shrink/Fatten tool has odd behavior 2012-09-28 14:31:07 +00:00
483a6cd6c2 fix for cycles/python script error in normal panel 2012-09-26 19:23:06 +00:00
d2695c62a2 Mask Editor: make Alt+S feather shrink/fatten work better when no feather was
defined yet, previously would just stick to original curve then.
2012-09-21 12:18:14 +00:00
edb78d090c code cleanup:
- make view3d project names more consistent.
- remove apply_project_float() its not needed.
- update comments referencing an old function name.
- move doxygen docs into the C file, prefer they are kept here to avoid getting out of sync with code.
2012-09-20 04:56:24 +00:00
e5d0dcb8d8 Few cleanup in matrix mathutils (make mul_m3_m3m4 and mul_m4_m3m4 consistant with other similar funcs, mainly copy-safe [i.e. you can use the same matrix as operand and result, saves lines in some already over-complicated code!]). 2012-09-16 15:25:28 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
05755d307a fix [#31946] Masking doesn't respect pixel ratio 2012-09-13 05:29:38 +00:00
2812dd92cf code cleanup: use BMEdit_FromObject() rather then me->edit_btmesh in more places. 2012-09-10 03:34:43 +00:00
1a7eb3454e style cleanup 2012-09-08 08:59:47 +00:00
0ecbc047e8 code cleanup 2012-09-06 23:41:03 +00:00
56534ecdcb style cleanup: also add debugging print function for derived mesh DM_debug_print_cdlayers() 2012-09-03 02:41:12 +00:00
0b4dfa1fcb Fix #32450: edge slide with multiple loops selected could move some loops
in the wrong direction.
2012-08-31 12:08:04 +00:00
0db80bdb88 Style cleanup - adding some braces around some multi-line statements (used after
if/else if/for)
2012-08-30 13:18:33 +00:00
93d89ec768 correct assert for customdata overlap, also quiet uninitialized warning in transform. 2012-08-24 08:17:53 +00:00
1939baa47d style cleanup 2012-08-22 16:44:32 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
5e0f254afa utility functions for getting/setting rectangles for operators. 2012-08-08 20:38:55 +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
1d5b2ea253 mask transforming when a mesh object was in editmode (but had no UV's), failed 2012-08-03 20:12:49 +00:00
c41e1e434a code cleanup: replace MIN2/MAX2 with minf/maxf 2012-07-29 16:59:51 +00:00
61469d2e3e code cleanup: remove unneeded 'struct' qualifiers 2012-07-26 22:47:05 +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
ee572a9642 code cleanup: minor edits for mask/transform 2012-07-26 21:22:42 +00:00
6b7d013d8d Fix #32123: Blender crashes when zoomed in and rotating around 3d cursor
Fix deadlock in drawArc caused by precision error. Helper widget could
look wrong, that's because of not enough precision of floats used by
Blender.

This is known issue of Blender and wouldn't consider a bug.
2012-07-26 09:29:37 +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
c8db1e832d minor edits for bmesh api 2012-07-20 09:49:54 +00:00
250cdd5e52 code cleanup: remove commented includes - mostly from 2.4x 2012-07-18 23:07:07 +00:00
db14b97be6 mask transform aspect correction wasn't working properly, also fix for own recent commit which made cyclic report not show 2012-07-18 20:32:31 +00:00
45738ef8dc Add Skin modifier's radius values to Transform panel (in 3D views). 2012-07-18 14:30:31 +00:00
e1449e3626 Fix [#32068] Edge slide not working in certain circumstance from Front / Side views
Only visible edges are used to create the "sliding vector". The test used to detect whether edges were visible or not was working for solid shading, but useless in wire draw mode (as all edges are visible in this mode!)...
2012-07-18 12:23:18 +00:00
01c3db149c Fix [#32086] Missing bevel "hold shift" for better accuracy.
This commit adds "shift" and numtype to both Bevel and Inset mesh operators.

It also gets rid of the magicnumber used in NumInput to str operation (currently, 20 chars per element, now defined as NUM_STR_REP_LEN in ED_numinput.h).
2012-07-14 14:03:36 +00:00
126024e537 Fix #31584: Fractional step in value input for Skin Modifier (Event/input problem)
Issue was caused by the code which checked whether snapping should be enabled
on transform init taking into account keymap and special keys state. It was
used for Ctrl-Click on manipulator only.

Check for Ctrl state gave wring result with skin modifier. It was solved
by additional check for which mode transformation is initializing for --
currently manipulator is available for translation/roation/resize only
which doesn't give any keymap issues.
2012-07-12 14:41:52 +00:00
Lukas Toenne
21f81ee279 Fix for center calculation in node transforms. This now uses the actual barycenter of node rect centers. 2012-07-10 13:50:51 +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
9f22750422 style cleanup 2012-07-04 20:47:12 +00:00
8b865c01cd style cleanup: comments 2012-06-30 22:49:33 +00:00
35d8424273 code cleanup: rename some members of bmesh operators, 'slots' is a C++ keyword which confuses some IDE's.
also added missing BMO_op_vinitf args to comments.
2012-06-30 09:55:04 +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
6b8986af43 revert part of 48340, it causes uvs across islands to stitch in a different way (?) than before 2012-06-28 15:09:24 +00:00
1ba5db129b recent fix for #31581 could crash when doing edge slide on a mesh with no UV's. 2012-06-28 14:18:04 +00:00
Lukas Toenne
855b6391ea Basic snapping in node transform operator.
Snapping actually was working already, but grid spacing was set to 1.0, which is basically pixel size in the node editor. Increased this to 1x grid step for fine snapping and 5x grid step for rough snapping.

Grid drawing in node editor now draws 2 levels in slightly different shades to indicate the different snapping modes better.

Node editor also supports the general use_snap tool setting to enable automatic snapping during transform. For now only the incremental snapping is supported, in future could be extended to enable alignment between nodes in a number of ways.
2012-06-28 08:47:22 +00:00
ae2f3a4e5e Fix for #31581, UVs shrink on edge slide.
Issue is that all loops of a face adjacent to the sliding verts were 
getting project-corrected. Introduced a test to only project the
affected loops. 

The projection code introduces a small offset to the boundaries so that
any boundary tests can work as expected, but this leads to shrinking of
the barycentric coordinates of the projection, causing a shrink of the
uvs in turn. This even affects the uvs that -should- be affected though
the unfixed behavior works strangely in a correctish way (my guess is
because the projection uses the same face as the opposite sliding loop).

I fixed the behaviour by taking the mean value of the uvs. This won't
support seams but current code doesn't either. Also, all CustomData to
exhibit this unfixed behaviour. I only fixed the uv case, other data
(Vcolors, etc) will have discontinuities when edge sliding. I expect
that the CorrectUV code I am working on may address some of these
issues.

Also, added NULL checks for utility function (was intended for this bug
but wasn't needed after all)
2012-06-27 17:08:12 +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
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
6e9e758d60 fix for un-initialized memory use for modal inset/bevel. 2012-06-10 09:05:49 +00:00