Commit Graph

158 Commits

Author SHA1 Message Date
7beb47bd69 fix for freeing NULL pointer. 2012-08-06 13:04:40 +00:00
9ddbd8329e fix uninitialized memory use for mask feather points, also remove some double promotions. 2012-08-05 13:26:39 +00:00
2044b62370 resolve some issues with curve resolution calculaction
- resolution could become so high that it would wrap around  to a negative number, now check for small numbers before doing float division.
- resolution was being calculated in some cases when it already met the clamp value - now this is skipped.
2012-08-04 20:17:22 +00:00
72a3fb15d7 changes to mask editing
- use Alt to modify all mask feather at once while dragging.
- copying a multi-user mask from the interface works now.
- show masks when UV editing isnt used, rather then checking editmode (would give some odd/annoying image space header).
- add a fake mask user by default.
- moving points with LMB drag no longer selects them.
2012-07-31 17:31:34 +00:00
4c02549d5d remove references to raskter from compositor and BKE mask. 2012-07-31 16:04:47 +00:00
3ec212fd71 patch [#32195] MASKS: Canonical Porter Duff algorithm for merge missing.
from Troy Sobotka (sobotka)

This gives nicer blending then 'ADD', setting as default for new masks.
2012-07-28 11:36:01 +00:00
9a2d862123 clamp mask resolution, the occasional crash would happen failing to alloc when adding feather points very close together. 2012-07-27 11:05:08 +00:00
52aa7a4a4c Added utility function to return marker's subframe position
Used in mask parenting stuff.
2012-07-27 10:12:58 +00:00
1543a713a8 copying a mask now copies its animation data too 2012-07-27 08:36:48 +00:00
c42b23030b copy support for mask datablocks 2012-07-27 08:18:11 +00:00
2b133b14ab mask/image viewer now works with non 1:1 image aspect, editing masks in the image viewer should be generally usable now though still some TODO's left. 2012-07-25 20:39:49 +00:00
d9dbea1836 move mask and draw settings into its own struct to be shared between spaces. 2012-07-24 20:33:55 +00:00
9b51503307 style cleanup 2012-07-21 22:58:08 +00:00
1bb7cfded6 Merge mask fixes from tomato branch
--
svn merge -r49075:49076 -r49086:49087  ^/branches/soc-2011-tomato
2012-07-21 09:01:39 +00:00
e80918604a Fixed wrong self-intersection check for non-closed splines 2012-07-18 11:48:13 +00:00
c05af6210e Fixed crash of self-intersection loop in special cases
It was wrongly calculated bucket number per side in cases when some
of segments is filling the whole bounding box across some of dimension.

Solved by limiting buckets at least to 1 in such cases.
2012-07-18 10:22:56 +00:00
2c2e1775f9 Feather self-intersection test speed up
Made some minor optimization such as:

- Avoid using "%" operation in loops, replace with a check
  for index "overflow".
- Use pre-computed values for scaling feather coordinates
  to 0 .. 1 space.

This allowed to reach couple of milliseconds of boost.

Another change is to use higher number of buckets (up to 512).
This doesn't took significantly more memory (like uses only 10MB
of memory for average splines) and allows to have 30-50x boost
for average splines.

Use dynamically calculated number of buckets for this, to be
sure segments would fit two buckets.

Also fixed intersection detection in some cases when edge is
shared between two buckets -- it is possible that such edge
would cross third bucket and intersect edge from there.
2012-07-17 16:22:18 +00:00
e35d3083ec Fixed crash when rasterizing spline with only one point
It was an issue in new feather self-intersection test code.
2012-07-17 10:43:57 +00:00
f4cff34392 disable feather collapse during drawing, its very slow. 2012-07-17 09:56:10 +00:00
1f96470b5d Fixed disappearing in some circumstances feather
Real fix would be to find a point which is definitely now on loop
to be collapsed, but that's for a bit later. This commit should
remove possible stoppers.
2012-07-16 19:23:15 +00:00
5915b53350 Fixed crash caused by recent feather collapse commit 2012-07-16 18:34:57 +00:00
92205486e7 Masks: feather self-intersection collapse function
This implements simple function which collapses internal loops
caused by self-intersections into a singularity.

This loops can't be removed because rasterizer expects points
of feather be aligned with points from spline itself.
2012-07-16 17:54:28 +00:00
f9e63430ac use calculated spline resoltion rather then fixed at 32. 2012-07-16 14:17:01 +00:00
5b4a455569 defailt to ease weight interpolation 2012-07-16 13:12:52 +00:00
8ce53a2a98 new mask rasterizer written to take advantage of the compositors threading, mostly functional but disabled by default (still a little wip). 2012-07-12 20:10:41 +00:00
c8d29b1996 feather points now align with mask outline when called with same resolution. 2012-07-12 09:03:45 +00:00
83d2314edf ability to calculate mask curve and feather with predefined resolution (*_ex functions) 2012-07-11 20:18:46 +00:00
492d9aabe0 some code refactors in raskter.c to sync it with build where mask tiling is being developed. Also adds a bit more mask tiling code. 2012-07-10 04:51:08 +00:00
689403bf57 updating raskter to support tiles compositor. this commit puts in some groundwork code to support tiles's pixel processor 2012-07-09 22:57:23 +00:00
facc2429ab Mask node: create a copy of layers to be rasterized in initExecution
This creates a list of splines to be rasterized in nitExecution which
is being called from main thread. This should resolve possible threading
issues discovered in tomato branch.
2012-07-04 07:10:23 +00:00
32478997ec style cleanup 2012-06-27 18:29:47 +00:00
238d3fa4bb mask re-key feature - mango request. ability to reset selected points shape key data.
useful if you add many keys to one part of a curve, then later want to key another part - but dont want to continuously make the same corrections.
2012-06-22 11:53:49 +00:00
54156e2b82 option to disable feather, since its so slow - for interactively editing masks its useful to be able to disable.
also rename RNA to 'use_antialiasing'
2012-06-21 12:27:57 +00:00
a550b6fe39 Silent masks "alloc new deform spline" debug print 2012-06-20 13:32:30 +00:00
470ad6fc0e Do not check result of BKE_tracking_marker_get -- it shall always
return valid marker. If not -- let blender crash, because that means
something went really bad and silencing this isn't good idea.

Also made mask parenting to tracking data aware of clip's start frame.
2012-06-20 10:54:56 +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
ceffc2cd50 add Anti-Aliasing (very rough draft algorithm, NOT FINAL version) to raskter lib. Code is still quite messy but will be replaced when final algo comes in anyway. 2012-06-13 19:57:23 +00:00
c83d37ccc0 mango request
- highlight active mask layers.
- remove keyframes when all layer data is removed.
2012-06-13 08:35:50 +00:00
16dededdf3 remove input socket of mask node, this wasnt used. 2012-06-12 18:36:49 +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
4413903370 support for subframe animation evaluation for masks. 2012-06-08 09:35:51 +00:00
ae3062b741 fix for own bug - evaluating past the last frame of a mask didnt work at all. 2012-06-08 09:27:40 +00:00
fc07b1fce3 Mask editing: remove use_parent property and use check if paren't id is set instead 2012-06-08 07:54:46 +00:00
bdf9e02346 new sequence strip type for masks. 2012-06-07 18:24:36 +00:00
32530c2827 Quite some warnings... 2012-06-07 18:21:07 +00:00
e261d5ca3b improvement to handle recalculation, only do this on auto-handles when they are in a spline. 2012-06-07 07:28:55 +00:00
052e34cc3d fix for bug where auto-handles were not calculated correctly for animated curves. 2012-06-06 20:26:26 +00:00
3e8ad394af code cleanup: remove unused mask args 2012-06-06 20:05:58 +00:00
465b11e971 operator to reset feather weights on all shape keys 2012-06-05 19:39:12 +00:00
fe58f668a1 mask point slide now accounts for scaled bezier weights, 2012-06-05 12:51:11 +00:00