Commit Graph
28 Commits
Author SHA1 Message Date
Thomas Wilshaw eed41c1f12 Comments 2020-09-03 15:25:07 +01:00
Thomas Wilshaw 8d6bd5e929 Fix Help option in headless mode on Windows
Help option failed when Olive was run in its own directory as strrchr
failed. If all else fails basename is equal to argv[0] and we don't
increment in the print statement. Tested on Windows 7.
2020-09-02 23:35:44 +01:00
Thomas Wilshaw 8682b1e678 Merge master into branch 2020-08-17 18:42:58 +01:00
Thomas Wilshaw f4da255b35 Attempt to fix CI build errors. 2020-07-17 17:35:29 +01:00
Thomas Wilshaw 098b40c98e Use cfloat instead of limits 2020-07-02 15:36:13 +01:00
Thomas Wilshaw b04fa02ab4 Explicitly include limits header to fix build issue on Linux. 2020-07-01 14:18:12 +01:00
Thomas Wilshaw 63c306c770 Fix typos 2020-06-22 13:45:51 +01:00
Thomas Wilshaw 53b8e7fa03 Fix comments and grammer 2020-06-22 13:27:54 +01:00
Thomas Wilshaw fdce84f34c Cleanup flipped Y axis code
There are now two functions to get the full matrix for the transformed
image. One that returns as is and one that returns with the Y
translation flipped for OpenGL.

Also some minor bug fixing.
2020-06-22 13:01:10 +01:00
Thomas Wilshaw 8f326c5193 Fix pixel sampler with translate/zoomed image
Pixel sampler now works with a zoomed/translated image. As usual we
have to flip the y translation as OpenGl stores images upside down.

Need to look at a better way of handling this.
2020-06-21 19:59:44 +01:00
Thomas Wilshaw ccb6efd6b6 Make gizmos work with translated/zoomed image
Added a new function that inverts the world transform and applies it to
a point. This allows the gizmo code to work in it's own space and not
need to know is the image has been zoomed or translated.
2020-06-21 19:31:40 +01:00
Thomas Wilshaw 1c6aebdcbe Move the world transform code to its own function
It seems like something that could come in handy elsewhere when drawing
stuff to the viewer.
2020-06-21 18:33:41 +01:00
Thomas Wilshaw 61618a9a14 Use a world transform for QPainter
World transform is based of the view matrix and can be used on any
QPainter that needs to draw on the canvas and move with the mouse/
zoom.
2020-06-19 16:41:29 +01:00
Thomas Wilshaw c735662232 First play with safe areas 2020-06-19 14:16:21 +01:00
Thomas Wilshaw 7665e9e240 Update comments. 2020-06-16 17:15:21 +01:00
Thomas Wilshaw 389f230050 Properly fix translation errors in viewer
Original fix was wrong, this sorts it out I think. Delta values had to
be doubled as we're in Clip space (I think) and the matrix
multiplication order had to be swapped around.

Updated one of the signla/slot pairs to be simpler as we no longer need
to pass the zoom percentage back and forth.
2020-06-16 16:57:38 +01:00
Thomas Wilshaw 100da912ad Add hand tool dragging
If Hand Tool is selected we can now drag with a left click AS WELL AS
middle click. This keeps the view behaviour in line with other widgets
in Olive.

For simplicity it does not use handmovableview.
2020-06-16 14:41:35 +01:00
Thomas Wilshaw 7617ddabe3 Fix translation bugs
The translation needs to be scaled relative to the zoom percentage so
we get sensible movement when dragging. Dragging is also disabled when
the image is smaller than the container widget.

Re-orders the initialisation of some variables to stop a compile
warning on Travis.
2020-06-16 11:53:37 +01:00
Thomas Wilshaw f6c70f583f Panning now only works if the viewier is zoomed 2020-06-16 11:53:36 +01:00
Thomas Wilshaw 92eadc6854 Cleanup 2020-06-16 11:53:35 +01:00
Thomas Wilshaw f4d56f79cb Add ability to reset translation to center 2020-06-16 11:53:34 +01:00
Thomas Wilshaw 2174100342 Add basic tranlation functionality to the viewer
Had to separate zoom and translate matrices to stop the zoom being
applied to itelf. This also required adding separate get/set functions
for each matrix and a GetcombinedMatrix() funtion.

Added those functions ot other files where needed ut may be wrong. Need
to look at export.cpp

Also changed the mouse move and press events to make translation work.
2020-06-16 11:53:34 +01:00
Thomas Wilshaw cb1127936a Implement Alt Click to default on sliders
The following sliders now have Alt Click functionality:
 - Nodes (What it's initialy set too or 0 if not)
 - Export Dialog Dimensions~ (Defaults to Sequence width/height)
 - Export Compression Settings~
    - Advanced (0)
 - Speed/Duration
    - Speed (100%)
    - Duration (clip length)
 - Stream Properties Image sequence
    - Start Index (1)
    - End Index (sequence length)

Sliders with no default value set ignore an Alt
Click.

Added SliderBase::SetDefaultValue() which sets the
default value of a slider.

Added ValueReset() to SliderBase signals which is
called if a slider is Alt Clicked on. Only updates
if default_value_ is not Null.
2020-05-07 22:14:37 +01:00
Thomas Wilshaw 49b8e2bfab gitignore updates for Visual Studio with CMake
Using Visual Studio and it's built in CMake generates a folder called .vs and a
JSON file of CMamke settings called CMakeSettings.json. These have both been
added to the .gitignore file.
2020-05-07 13:28:21 +01:00
Thomas Wilshaw df97a86dbc Fix first usable stream being selected
Footage Properties should always select the first usable stream. Commit 1fa3f4e
didn't quite fix this with all footage. This should.
2020-05-05 22:32:11 +01:00
Thomas Wilshaw 1e81969fca Waveform fixes
- Due to a floating point division error not all the bars on the waveform were
  being drawn.
- Fix ratio in the fragment shader
2020-05-05 11:29:15 +01:00
Thomas Wilshaw 921a5f357e Merge branch 'master' of https://github.com/olive-editor/olive 2020-05-04 18:11:43 +01:00
ThomasWilshaw 3074e4e507 Merge pull request #1 from olive-editor/master
Merge Olive into fork
2020-05-04 17:34:03 +01:00