Commit Graph
153 Commits
Author SHA1 Message Date
itsmattkc 12be8f72f1 node: disconnect all parameters before destroying them
Fixes a common segfault where destroying a node may ripple a disconnect
signal up the graph and trigger something to try to access its
(now-destroyed) parameters.
2020-06-03 03:40:31 +10:00
itsmattkc 2039067fdc renderer/viewer: fixed playback and live updates from value changes 2020-05-15 15:02:30 +10:00
itsmattkc 218c63f933 nodecombobox: implemented node combobox widget 2020-05-09 03:22:09 +10:00
itsmattkc 1efd4e9f99 nodeview: further improved auto-positioning system 2020-05-08 19:20:24 +10:00
itsmattkc 5b956729b3 gizmos: work towards gizmos in the matrix transform node 2020-05-07 18:12:18 +10:00
itsmattkc 3436740d23 gizmos: consolidated input param dragging code into reusable class 2020-05-07 14:41:50 +10:00
itsmattkc d02e9090b9 implemented core gizmo interaction functionality 2020-05-07 04:45:27 +10:00
itsmattkc 67854a2c97 gizmos: use scale instead of matrix transform
Improves appearance of gizmos lines and ensures other controls are drawn in
UI dimensions rather than texture dimensions.
2020-05-06 17:45:44 +10:00
itsmattkc 1ceefb6dba Merge branch 'master' into gizmos 2020-05-06 16:35:40 +10:00
itsmattkc 74d252c5c0 nodes: use defined categories rather than arbitrary string based 2020-05-05 22:12:15 +10:00
itsmattkc c387ce1cd7 polygon node: early crude implementation 2020-05-05 00:22:49 +10:00
itsmattkc cfc5ce24a3 Merge branch 'master' into gizmos 2020-05-02 17:06:49 +10:00
itsmattkc aecfa842c3 nodes: moved hashing to nodes so they can override behavior if they wish 2020-04-30 01:56:08 +10:00
itsmattkc bf68a4d631 nodes: added ability to label nodes 2020-04-29 15:35:05 +10:00
itsmattkc 999e841bc7 nodes: implemented short name
Nodes can provide "short" names for use in the node graph, distinct from their
full names shown everywhere else.
2020-04-29 14:33:57 +10:00
itsmattkc d74d6a1542 nodes: implementing saving/loading node positions from project file 2020-04-28 03:43:35 +10:00
itsmattkc e154b5d5d4 nodeview: make auto-position a manual and specific function, allow different flow directions
The first in many NodeView improvements. Up until now, nodes have been forcibly
auto-arranged, which has worked as a reasonable stop-gap just so that all the
nodes are visible during testing/development. However this does not make a good
user experience.

We move the auto-arrange code to a manual function that can be used when the
user or program deems it necessary, and also abstract the node positions so that
the view can ultimately determine the exact amount of spacing (useful for
changing DPIs) or orientation, so users can direct the flow whichever way they
want.
2020-04-28 00:28:38 +10:00
itsmattkc 1cca9de7c5 gizmos: implemented pathway for node to draw on the viewer 2020-04-27 04:34:36 +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 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 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 1363d2b94c mathnode: expanded math node
Implemented handling of various different types.
2020-04-01 05:21:50 +11:00
itsmattkc 6f0d72c05d renderer: switched audio rendering over to planar buffers
While planar audio cannot be used for playback, it's much easier for processing.
This should lead to cleaner and easier to write code in the future.
2020-03-31 18:01:20 +11:00
itsmattkc 18c36155d7 Merge branch 'master' into mathnode 2020-03-31 02:39:46 +11:00
itsmattkc a855dea8de timeline/project: block serializations to and from xml now include links
Fixes issue where blocks would become unlinked after copy/paste or save/load.
2020-03-31 02:38:14 +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 7100d00060 nodes: made changes to the node system to allow for context sensitive shader code
Primarily implemented for the math node so a new shader can be generated and
compiled based on what inputs the node is receiving.
2020-03-29 03:11:30 +11:00
itsmattkc 3399227b3a keyframeview: implemented transforming keyframe times to and from sequence time
Since the node graph can have transform cross nodes, input keyframes may occur
at a different times requiring transforming between sequence time and media
time. This commit implements such a mechanism in all UI classes that need it.
2020-03-26 19:17:46 +11:00
itsmattkc c5d3c4ff36 node: implemented convenience functions for transforming time
Implements a function that calculates the time transformation(s) only between
one node and another.
2020-03-26 00:26:13 +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 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 0469fac4a9 node: send invalidatevisible signal through graph
When dragging a value in the UI, we use a "single frame update" because we want
to prioritize the currently visible frame to give visual feedback as soon as
possible. Previously, we generated a single frame InvalidateCache() signal
from the widgets themselves, but this had the major downside of not necessarily
emitting the time that the viewer was actually showing (due to either node time
transformations or times differing between the effects panels and the viewer
panels). Now, we send a different signal that viewers can handle themselves to
update the time that they're currently showing. This means the fast updating
will work no matter how many viewers are connected at whatever time each viewer
is set to.
2020-01-26 14:16:22 +11:00
itsmattkc 7bb8da8d79 node: rewrote problematic GetExclusiveDependencies() function
Function would erroneously pick up nodes that weren't actually dependencies.
2020-01-25 16:37:28 +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 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 d9572fa4e5 only allow splitting clips 2020-01-07 19:04:24 +11:00
itsmattkc f0cd480540 finished audio effects support in audio renderer
Working structure implemented in previous commit into the audio renderer is
complete in this commit.
2019-12-24 14:02:07 +11:00
itsmattkc 7ad2eae7a2 implemented volume and pan effects
This commit implements a structure for sample processing and two implemenations
of this structure in volume and pan effects.
2019-12-24 12:34:30 +11:00
itsmattkc 0b7782e129 added support for multiple node iterations
Optimizes various effects, particularly blurs.
2019-12-15 00:39:28 +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
itsmattkc 323718bc11 moved timeline undoable commands to using the new NodeAddCommand
Previous iteration used some "magic code" that added clips automatically to the
timeline. This was functional but ultimately outside of the undo commands'
control meaning nodes could be infinitely added and abandoned. This makes the
add process part of the undo command which means it's all undoable as the user
would expect.
2019-12-14 00:04:57 +11:00
itsmattkc f46b1245c4 reduced the output of some nodes
Some nodes don't need to provide all their inputs merged as outputs.
2019-12-10 00:37:06 +11:00
itsmattkc 2fb4047e6f moved all shader code out of C++ source and into external shader files
General code cleanup and easier maintenance.
2019-12-10 00:10:00 +11:00
itsmattkc 26b3993b9d made vast improvements to rendering engine and node structure
This was many changes that were largely fundamentally related. They included:
- More const modifiers to enforce read only node graphs
- Support for fragment and vertex shaders from the nodes
- Support for node code loaded externally (embedded into the binary)
- Fixed issue preventing two textures from being used in a shader
- Removed several unused functions and cleaned up code
- Fixed video media node misreading its matrix input
2019-12-09 23:50:52 +11:00
itsmattkc 351d4a246e use NodeInputArray for tracks as well
These were introduced for the new Block system and make just as much sense for
the Track system. They've now been implemented for both.
2019-12-06 20:34:19 +11:00
itsmattkc 5227e10f39 render one frame per thread for increased parallelism
If the nodes are now stateless, there's nothing stopping the renderer from
rendering multiple frames at once. Earlier since the nodes held some of their
input/output data (and that data could change per frame), it was not possible
to render multiple frames at once without conflicts. Now that the node state is
held in render threads, they can do whatever they want at any time.
2019-12-06 15:37:31 +11:00