Commit Graph
57 Commits
Author SHA1 Message Date
Thomas Wilshaw f99600ed40 openglrender: Add attributeLocation check
Sometimes when the default fragment shader is used a_texcoord is
optimised out
which can cause GL errors. Also adds the same check for a_position
preemptively
2021-03-27 01:50:17 +00:00
Thomas Wilshaw 0f2c44866a Remove unneeded invokeMethod. 2021-03-23 23:17:47 +00:00
Thomas Wilshaw b1b7d58e9d transition: Add transparency support to transitions
Added ShaderJobEvent to CrossDissolveTransition which sets alpha as
required.

app/node/block/transition/crossdissolve/crossdissolvetransition.cpp
app/node/block/transition/crossdissolve/crossdissolvetransition.h
2020-11-23 21:53:09 +00:00
Thomas Wilshaw bc2f203d42 ocioutils: Use OCIO_NAMESPACE for our namespace 2020-11-20 00:52:44 +00:00
ThomasWilshaw 400d22abcc Merge pull request #1386 from prokoudine/master
mainmenu: Mark Window menu for translation
2020-11-20 00:11:58 +00:00
Thomas Wilshaw cef64f42b7 Update fix for old OIIO versions. 2020-11-18 23:22:40 +00:00
Thomas Wilshaw 0e0d557b1b videostreamproperties: Fix alpha checkbox
Check video_premultiply_alpha is not null before trying to access its
members in VideoStreamProperties::Accept.

Also initialise video_premultiply_alpha as nullptr in the constructor.
app/dialog/footageproperties/streamproperties/videostreamproperties.cpp
2020-11-16 20:26:45 +00:00
Thomas Wilshaw 4ddc659335 MediaInput: Rename streams access methods.
Change MediaInput::footage() to MediaInput::stream() and
MediaInput::SetFootage() to MediaInput::SetStream() as they access
streams not footage.

Also update all instances of access methods to reflect this change.
2020-10-19 15:50:36 +01:00
Thomas Wilshaw 7281806c38 Fix #1271 Duplicate Keyframed Node
When nodes with keyframes were copied their parent NodeInput was not
set properly leading to a segfult when key->GetParent was called in
KeyframeViewItem::UpdatePos().

This fix properly sets parent_ when keys are copied.
2020-10-16 22:30:54 +01:00
Thomas Wilshaw 70455c1501 Fix building without OTIO support
Added a new CMake flag that stops any OTIO related cpp files being
built.

Added extra #ifdefs to catch any OTIO related code in other cpp
files.
2020-10-15 18:59:06 +01:00
Thomas Wilshaw b676f2f8b6 Fix #1252
Checks if the SampleBuffer is valid before trying to extract its
packed data. If it is not valid Olive writes blank segments instead.
2020-10-13 12:19:06 +01:00
Thomas Wilshaw 9d27d557cd Replace custom unlink with BlockUnlinkAllCommand
Re-use existing unlink command and move all the unlinking code to
NodeRemoveCommand to cover all bases (deletion of a block in the
timeline or in the node editor).
2020-09-30 18:14:11 +01:00
Thomas Wilshaw e09afd7f68 Fix Issue#1241
When a Block node was deleted its linked blocks were not unlinked
which caused a crash when the user tried to select a linked block.
This fixes the issue by ensuring all links are removed when a Block
node is delete.

Undo/redo is also supported.
2020-09-29 18:27:30 +01:00
Thomas Wilshaw 7704e00443 Cleanup 2020-09-29 14:14:21 +01:00
Thomas Wilshaw 56e2b51041 Add filename to warning message. 2020-09-29 14:03:25 +01:00
Thomas Wilshaw a71df11fa6 Deal with composite blocks
If a block relies on mulitple inputs (i.e. a composite) then don't
delete these from the timeline. We catch these inputs afterwards.
2020-09-29 13:29:59 +01:00
Thomas Wilshaw 791857fba1 Cleanup. 2020-09-29 12:03:01 +01:00
Thomas Wilshaw 8e6b42a160 Simplify and clean up
Remove the Undo code for deleting a clip and replace it with simpler
parent/child undo relationship.

Move block gathering code to seperate function. It's quite brute
force and might lead to issues further down the line with more
complex composited node setups.
2020-09-29 11:31:03 +01:00
Thomas Wilshaw aef9078598 Fix delete redo code 2020-09-29 10:56:30 +01:00
Thomas Wilshaw 92db735022 Add Delete functionality. Still buggy. 2020-09-29 00:06:38 +01:00
Thomas Wilshaw 602f96b2b6 Cleanup comment 2020-09-28 14:33:58 +01:00
Thomas Wilshaw 5bb9cb0cca Make Offlining footage an UndoCommand
Created a new UndoCommand in ProjectViewModel that set the footage
input to a nullptr and resets it to the correct stream on undo.
2020-09-28 14:33:58 +01:00
Thomas Wilshaw c1e345611d Cleanup. 2020-09-28 14:33:56 +01:00
Thomas Wilshaw 0f1d4ec1b8 Make sure image sequences are caught. 2020-09-28 14:33:55 +01:00
Thomas Wilshaw 0e272b6bba Cleanup and add warning message. 2020-09-28 14:33:54 +01:00
Thomas Wilshaw 3ed0cb2ab9 Move search code to seperate function. 2020-09-28 14:33:54 +01:00
Thomas Wilshaw 7c7db5c933 Check footage in use before deleteing
Initial very hacky implementation that checks if the footgae is in
use before deleting it and makes sure all refernences to it are
properly cleaned up.

Also added IsMedia() function to Node to simplify things a bit.
2020-09-28 14:33:53 +01:00
Thomas Wilshaw 378708c9d3 Exporter falls back to timeline if all else fails
If no recent TimeBasedPanel can be found the exporter defaults to the
first timeline. If this also fails an error is shown.
2020-09-24 17:46:11 +01:00
Thomas Wilshaw 615ce8ef79 Fix Issue #1218
Add an error message if there is no active sequence.

Selected a Sequence panel as opposed to a generic time based panel as
we will only ever export a sequence. Also makes error logic slightly
easier.
2020-09-23 17:59:15 +01:00
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