Commit Graph

81 Commits

Author SHA1 Message Date
48b1656a6c Cleanup: shadowing (editors) 2015-11-23 17:40:50 +11:00
Julian Eisel
ef629e0d50 Quiet warnings
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
2015-09-04 01:04:37 +02:00
f9c7cbd989 revert part of 7a1dc20
These warnings are false positives & confuses intended logic to set dummy values.
2015-01-12 11:46:44 +11:00
7a1dc20560 Cleanup: quite some harmless but noisy warnings from gcc... 2015-01-11 21:14:39 +01:00
491839b3c8 Fix T42857: Inconsistency between cache line visibility and ability to change frame from image space 2014-12-09 20:34:28 +05:00
bdc41ca756 Code cleanup: Move output arguments to the end of the list 2014-10-13 18:06:18 +02:00
bcee57e74e Roto: Improve spline sliding vs. curvature detection
If the mouse is closer to the spline than to it's center do a
spline curvature correction operator instead.
2014-10-13 17:59:03 +02:00
99a386da9e Code cleanup: Prevent possible int->float conversion 2014-10-13 17:52:14 +02:00
fa021e3a44 Code cleanup: Use new SQUARE() macro to get squared distance threshold 2014-10-13 17:48:10 +02:00
0a738280e1 Cleanup 2014-10-11 11:44:28 +02:00
96c2d67797 Fix T42030: Grabbing the whole mask interfere with grabbing individual curve
This fix is for the final 2.72 release.
2014-10-02 19:28:07 +06:00
2cca83caf1 Fix T41981: Crash by Copy mask splines without splines 2014-09-28 14:37:33 +06:00
dcc281b74a Fix T41961: Crash by Copy n Paste splines to new mask without layer
It makes much more sense to ensure layer before pasteing, makes roto
as easy as it has never been before!
2014-09-26 14:37:30 +06:00
09fc5d6a37 Roto: Add spline dragging zone in it's center
This dragging zone is visualized as the circle (the same as object origin)
in the spline bounding box center and dragging that circle drags the whole
spline.

Pretty much basic functionality, but quite useful in practice.

Requested by our roto team (Sebastian and Sean :) in IRC.
2014-08-19 21:29:45 +06:00
3196a230a6 Mask slide can be cancelled with RMB now 2014-08-19 17:23:18 +06:00
22a961317a Fix T40546: Duplicate spline breaks shape keys 2014-06-19 13:53:43 +10:00
11a156255d Fix T40412: Moving mask layers does not invalidate mask drawing in the movie clip editor
Issue was caused by a missing WM_event_add_notifier(..) in the mask_layer_move_exec() function...
2014-05-28 20:00:41 +02:00
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
392065ed40 Fix for typos in array size 2014-04-04 18:03:17 +06:00
41e2dc7746 Fix for mask slide operators didn't work with LMB selection 2014-04-04 17:23:45 +06:00
1aa753ce88 Mask spline slide didn't respect auto-key 2014-04-04 17:19:36 +06:00
2a62a06e86 Mask spline slide: holding Ctrl will make handles free 2014-04-04 17:08:35 +06:00
0579a6e209 Followup to the previous commit: forgot to tweak handle type 2014-04-04 16:49:50 +06:00
68bc675af4 Mask spline segment slide improvement
This implements weighted slide of second handle, just the
same exact way as it works in Gimp.
2014-04-04 16:44:09 +06:00
896725e0bb Mask point slide: clean-up of SlidePointData structure 2014-04-04 15:11:39 +06:00
31c73586d6 Maks point slide: get rid of jump when you press shift 2014-04-04 15:03:14 +06:00
6cf86f2725 Mask point slide: remove commented out code
The code wasn't needed for quite a while already, so
let's get rid of it.
2014-04-04 14:36:41 +06:00
884b9e27f6 Mask curvature slide: reduce jumps on slide
Also correct wrong logic around tweaking handles type.
2014-04-04 14:34:11 +06:00
0102d57c1d Slide mask spline segment to define it's curvature
This actually implements the idea used in Gimp which is grabbing
an arbitrary point on the spline and dragging it, ensuring spline
goes over this point. This is really useful way to tweak spline
curvature.

Currently only affects on a closest handle, meaning no weighting
on changes for both handles which are adjacent to the same segment
will happen just yet,

Another limitation is that currently such a slide is a big jumpy
when you start sliding. This is because projection is not used
to calculate u value because projection used to fail a lot for
me here and didn't find a nice solution for this yet. But this is
to be improved for sure!
2014-04-03 18:20:17 +06:00
f38331adef Code cleanup: style 2014-04-03 09:24:09 +11:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
42fca2f145 Usual UI messages fixes... 2014-03-31 21:15:56 +02:00
c58f000e57 Vector handles were hidden but were allowed to slide apparently 2014-03-31 18:33:09 +06:00
5e4f789173 Code cleanup: use false/true/bool for masking 2014-03-31 15:23:27 +06:00
851805d84e Masking: fix for initialdeather point not being offset to the mouse position 2014-03-31 15:00:40 +06:00
f06a1b77e2 Maksing: fix issue when it's not possible to drag right handle of aligned handles 2014-03-31 15:00:40 +06:00
482201d1a0 Style cleanup 2014-03-31 05:46:19 +11:00
8b43b9f255 Fix for mask vert add-slide dragging flipped direction 2014-03-29 06:44:40 +11:00
1af69b6df3 Implement asymmetric and free handles type for masks
Summary:
The title actually says it all, it's just possible to
have independent free handles for mask splines. Also
it's now possible to have aligned handles displayed
as independent handles.

Required changes in quite a few places, but they're
rather straightforward.

From user perspective there's one really visible change
which is removed Handle Type menu from the panel. With
asymmetric handles it's not clear which handle type to
display there. So now the only way to change handle type
is via V-key menu.

Rewrote normal evaluation function to make it deal
with new type of handles we support. Now it works in
the following way:

- Offset the original spline by maximal weight
- Calculate vector between corresponding U positions
  on offset and original spline
- Normalize this vector.

Seems to be giving more adequate results and doesn't
tend to self-intersect as much as old behavior used to,

There're still some changes which needed to be done, but
which are planned for further patch:

- Support colors and handle size via themes.
- Make handles color-coded, just the same as done for
  regular bezier splines in 3D viewport.

Additional changes to make roto workflow even better:
- Use circles to draw handles
- Support AA for handles
- Change click-create-drag to change curvature of the
  spline instead of adjusting point position.

Reviewers: campbellbarton

CC: sebastian_k, hype, cronk

Differential Revision: http://developer.blender.org/D121
2014-03-28 17:54:38 +06:00
9c79fd1193 Fix T38669: Mask duplicate fails with multiple layers
Allow duplicating splines from inactive layers. This way it's
more useful IMO than restricting duplication to an active layer.

TODO: What should be a behavior for clipboard (currently it copies
splines from an active layer only)?
2014-02-17 12:39:15 +06:00
b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
37026b12ec Code cleanup: use bool for static methods 2014-02-05 22:36:15 +11:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
fed1b8b16d Code cleanup: suffix vars to make obvious they are squared 2014-02-03 02:46:45 +11:00
a1a0ebbf49 Code cleanup: use length squared where possible 2014-02-02 02:24:48 +11:00
1d12c3fd53 Implement clipboard for mask splines
So now it's possible to copy-paste splines between layers.

Implementation is pretty much straightforward and duplicates
some logic which we've got in sequencer/tracking clipboards.

Will work on a common routine for clipboards later, for now
it's not so much crucial to have.
2014-01-27 15:42:46 +06:00
348cf17448 Code Cleanup: no need to pass empty strings as default values 2014-01-16 22:00:29 +11:00
b2fdc591c3 UI: restore confirmation popups for delete operators.
It turned out this was leading to accidental deleting in some cases when the
info message was missed by users. Fixes T37801.
2013-12-20 01:40:33 +01:00
cedc90b607 Fix errors and inconsistencies in confirmation popup removal.
* Improve some clip editor messages
* Remove popup for metastrips, seems unnecessary
* Renamed some variables for consistency
* Avoid unnecessary call to CTX_DATA_COUNT

Reviewed By: sergey, campbellbarton, aligorith

Differential Revision: http://developer.blender.org/D44
2013-11-29 17:49:01 +01:00
63caaa2b12 Code Cleanup: rename vars for detecting change to be more consistent
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
2013-11-26 06:39:14 +11:00