Commit Graph
78 Commits
Author SHA1 Message Date
itsmattkc 3ab36eb7fc deserialization: tolerate missing vector values 2020-09-15 12:00:25 +10:00
itsmattkc ac649c86c5 datatype: convert kInt type as a int64_t (which QVariant can't do automatically) 2020-08-10 18:30:35 +10:00
itsmattkc edeeed49ba various: enabled config saving 2020-08-08 02:44:39 +10:00
itsmattkc efd90d5c8f renderer: use shared backend when caching
I think there was an earlier commit with a similar name but turns out
I'd only done foundational work in that commit and never actually
properly set it up. Of course once I did, there were several issues that
needed fixing to make it work correctly, but now it works as expected.

Heavily optimizes larger projects by allowing cache jobs to only copy
what has changed.
2020-07-10 18:39:47 +10:00
itsmattkc 65ccac1dfe renderer: fixed bug that would render frames even after hash matching
Also enables the -Wshadow GCC warning to warn against the code bug that
caused this issue (and has caused other issues like it in the past).
2020-06-19 20:25:05 +10:00
itsmattkc a6a5c113ca nodeinput: added convenience function for determining if a value is expected to change over time 2020-06-12 03:27:52 +10:00
itsmattkc 71ec148e76 renderer: moved all shader code into one solidified function
Makes texture-based optimizations easier when they're all in one place.
2020-06-10 01:54:02 +10:00
itsmattkc d653070a9d slider: reviewed and conformed code 2020-05-09 18:53:00 +10:00
itsmattkc 69941dc2da nodes: added access to default value 2020-05-08 00:37:43 +10:00
itsmattkc e67dabf1ff keyframes: implemented deleting keyframes with the delete shortcut 2020-05-01 17:01:16 +10:00
itsmattkc 53ae25a7cb nodes: optimize node graph changes by only updating from inputs that changed
A huge optimization that ensures only the parts of a node graph that have
changed get pushed to the renderer. For thread-safety, the node graph is
copied elsewhere so that users can make changes asynchronously and the graph
can update when its threads are ready. Up until now, if an input value changed,
every node's values would be re-copied, or worse, if a connection was changed,
the entire graph would be recopied. This has been negligible in testing since
we've been largely testing with small graphs, but for massive projects, it's
important that this be as optimized as possible.
2020-04-26 04:16:15 +10:00
itsmattkc 258f83d5d3 node: fixed bug that failed to load some default values from shader xml 2020-04-22 18:13:53 +10:00
itsmattkc d3b71e6576 nodes: color management when setting color parameters is now preserved 2020-04-18 17:43:37 +10:00
itsmattkc 2f80be437a node: fixed issue with "taking" values from input tables
As opposed to simply leaving all values in the table, nodes can now "take"
values that they use to free up memory (e.g. "taking" input buffers if they're
used to produce an output buffer).

This is a fairly large change, expect regressions.
2020-04-16 23:12:05 +10:00
itsmattkc a0a7d106dc mathnode: implemented add/subtract/multiply/divide/power functions
Includes implementing combobox UI for the NodeParamViewWidgetBridge.
2020-04-15 01:52:24 +10:00
itsmattkc 1aa87cbda6 various: encapsulate all code in the olive namespace to avoid name collisions
Large-scale code cleanup. Also adds a license to the top of all files that were
missing it.
2020-04-06 15:29:53 +10:00
itsmattkc a21e7b1e77 nodeinput: implemented color
Implements converting color to and from string, keyframing color, and
conversion between the class and its keyframe tracks.
2020-04-04 04:19:24 +11:00
itsmattkc 2bda306866 timeline/various: implemented block copy/paste
Implemented the ability to copy/paste blocks/clips in the timeline. This did
require some large scale changes and reworking of the copy/paste system
introduced a few commits ago, but should be largely functional now.
2020-03-31 02:19:05 +11:00
itsmattkc a1f5c85f49 various: use simpler/smarter XML reading functions
Should address any XML parsing issues and allows for simpler, more maintainable
code. Should also address a crash that could occur when pasting nodes that had
inputs that weren't copied.
2020-03-17 02:38:17 +11:00
itsmattkc 34f60e639a nodeview: implemented copying/pasting nodes
Re-uses XML-based project saving/loading functions to store nodes, their
parameters, and their connections in a text-based format in the clipboard.
2020-03-15 20:01:58 +11:00
itsmattkc 3f043496f3 nodeparam: allowed for dynamic nodeparam property change to affect UI widgets
immediately
2020-03-07 02:16:48 +11:00
itsmattkc c168bf1a80 nodeparam: implemented parameters that allow arbitrary properties to be set
for UI representations

Allows properties to be set without adding explicit extra members to NodeInputs.
Crucially this means parameters like slider value representations (percent,
decibel, etc.) can be set from NodeInputs now.
2020-03-07 01:21:36 +11:00
itsmattkc 22046535ca various: added hooks so that various lengthy functions could be cancelled from another thread 2020-02-17 02:10:12 +11:00
itsmattkc 110b5741e0 nodes: remove user input mutexes
These were no longer ever used and thus served no purpose.
2020-02-03 01:27:00 +11:00
itsmattkc b713ab47eb keyframes: only update active frames even from curve and param editor
When adjusting a slider, keyframe time, or curve value, it is undesirable to
re-cache the entire affected area while the user is still dragging UI objects.
Since the video is unlikely to be playing, the priority must go to the
currently active frame so the user gets visual feedback on the rendered image
as soon as possible. This was implemented in some areas, but this commit should
have that functionality in all areas.
2020-01-25 17:51:34 +11:00
itsmattkc 1dfac0ea7f timeline: removed unused variable in undo command 2020-01-19 23:52:23 +11:00
itsmattkc 4697b98980 fixed gcc compile issues 2020-01-19 20:39:48 +11:00
itsmattkc 6771a2f1cb implemented footage loading from projects
Footage is a special case where the node parameters can reference objects that
exist outside of the graph. Therefore specific code is needed to
serialize/deserialize.
2020-01-15 18:26:42 +11:00
itsmattkc 75a9291cd2 refactored import function for greater robustness
The import function was written early on in the rewrite as a multithreaded
background task that was considered somewhat flawed. While it worked for the
most part, there were possibilities of race conditions that could have
potentially been fatal, particularly since media could theoretically be
deleted while the import/probe tasks were running in the background.

With the save/load functions coming in, it became even more complicated as
projects may include metadata about the footage that can't be implemented
easily when the footage is imported/probed in the background. Making importing
a modal task fixes all of these issues, it's still done in a background thread
to not hang the GUI thread, but the GUI thread can be briefly "paused" in a
user friendly way so that all these functions can be safer.
2020-01-15 15:19:14 +11:00
itsmattkc 16904c976f serialize rationals correctly and move block name to a node input
Since rationals aren't a known Qt format, the QVariant container can't
automatically convert them to and from strings (for XML serialization). We have
to hijack these functions and do the conversion manually for those types.

Also moved the block name type to a node input, which means it's serialized
and copied by default (I'm not sure why it wasn't already like this).
2020-01-14 00:59:49 +11:00
itsmattkc 0ea98be443 ensure objects are in the correct thread when loading
Since we load in a separate thread, when the QObject based objects are
instantiated, they're created with affinity to that separate thread. Now we
specifically ensure they are moved to the main thread after their creation.
2020-01-14 00:10:21 +11:00
itsmattkc 16878e3c25 implemented much of the project loading logic
Still not functional, but much of the groundwork is done.
2020-01-13 04:09:06 +11:00
itsmattkc bb57884cac added save functions to various classes
Each class is responsible for its own saving and loading from the XML data
in order to reduce the complexity of the save code.
2020-01-12 18:36:31 +11:00
itsmattkc dd77ea46a5 nodeinput: remove unused bool member 2020-01-02 05:04:46 +11:00
itsmattkc 41927512e9 fixed dodgy implementation of NodeInput::get_keyframe_at_time
This function didn't return the intended result. This bug has been fixed in this
commit.
2019-12-30 16:05:24 +11:00
itsmattkc 245aa44efc implemented support for multilayered keyframes
This adds the ability to keyframe more than one value per input (e.g. a vec2,
vec3, etc.) so that you can animate, for example, an X axis separately from a
Y axis.
2019-12-30 04:47:23 +11:00
itsmattkc ae84067084 reworked NodeInput to accept more than one keyframe "track"
To allow keyframing of each axis of a vector 2/3/4, without simply separating
the inputs for each axis, the NodeInputs need to support more than one keyframe
track with the ability to merge them into a single value when necessary.
2019-12-30 02:12:48 +11:00
itsmattkc 994d8be961 implemented bezier interpolation into parameters inputs 2019-12-28 23:21:07 +11:00
itsmattkc 1d3d52db9b implemented the ability to modify bezier points in the curve editor 2019-12-28 22:40:30 +11:00
itsmattkc bbef9badc7 implemented moving keyframes around in the NodeParamView
Can now change the time in the parameter panel.
2019-12-27 22:13:00 +11:00
itsmattkc 3e3963dfaa implemented keyframe type changing
Implemented the UI to change a keyframe's type along with the ValueChanged
signals that should result.
2019-12-27 16:37:06 +11:00
itsmattkc 855fe5e93f fully implemented setting keyframes and standard values in the NodeParamView
Widget now supports creating keyframe and standard values, supports dragging
from sliders (not creating an undo command for each drag), and everything is
undoable.
2019-12-27 14:51:21 +11:00
itsmattkc e9663f953e improved intelligent keyframe cache invalidation
Some minor code cleanups and also implementing invalidation when removing or
moving a keyframe.
2019-12-27 03:26:27 +11:00
itsmattkc cc62c1edc9 implemented context sensitive value invalidation in NodeInput
NodeInput uses keyframe information to intelligently determine exactly which
time ranges must be re-cached.
2019-12-27 03:00:13 +11:00
itsmattkc e32376a8b7 updated NodeInputs to use a standard value as well as keyframed values
Previously the non-keyframed value was stored as a static keyframe but this
introduced issues when an input was in a state of keyframes being enabled but
0 keyframes existing. Having a standard value makes much more sense.
2019-12-27 02:06:41 +11:00
itsmattkc 87eacb2869 fix input bug that doesn't deep copy keyframes correctly 2019-12-26 21:51:08 +11:00
itsmattkc c62b59965e updated nodes for new input structure
Since all NodeInputs will generally only need their data type and default
value set once, we place it all into the constructor for cleaner and easier
to manage code.
2019-12-26 16:29:56 +11:00
itsmattkc dc6d498da8 began UI for keyframing
Largely extending the existing NodeParamView with functionality from the
previous release.
2019-12-25 01:20:46 +11:00
itsmattkc a9f59b54de ensures copied graph is updated when values are copied
While the copied graph doesn't pick up InvalidateCache signals, some node
processing relies on NodeInput update signals to update their internals
correctly.
2019-12-14 23:16:30 +11:00
itsmattkc 2f04a53054 implemented deleting clips in the timeline
Also fixed bugs in the Node::GetExclusiveDependencies function and in the
NodeInputArray::RemoveAt function to make this functionality work.
2019-12-14 17:10:06 +11:00