Commit Graph

13 Commits

Author SHA1 Message Date
09874df135 Structural cleanup and improvements for the compositor.
Many parts of the compositor are unnecessarily complicated. This patch
aims at reducing the complexity of writing nodes and making the code
more transparent.

== Separating Nodes and Operations ==

Currently these are both mixed in the same graph, even though they have
very different purposes and are used at distinct stages in the
compositing process. The patch introduces dedicated graph classes for
nodes and for operations.

This removes the need for a lot of special case checks (isOperation etc.)
and explicit type casts. It simplifies the code since it becomes clear
at every stage what type of node we are dealing with. The compiler can
use static typing to avoid common bugs from mixing up these types and
fewer runtime sanity checks are needed.

== Simplified Node Conversion ==

Converting nodes to operations was previously based on "relinking", i.e.
nodes would start with by mirroring links in the Blender DNA node trees,
then add operations and redirect these links to them. This was very hard
to follow in many cases and required a lot of attention to avoid invalid
states.

Now there is a helper class called the NodeConverter, which is passed to
nodes and implements a much simpler API for this process. Nodes can add
operations and explicit connections as before, but defining "external"
links to the inputs/outputs of the original node now uses mapping
instead of directly modifying link data. Input data (node graph) and
result (operations graph) are cleanly separated.

== Removed Redundant Data Structures ==

A few redundant data structures have been removed, notably the
SocketConnection. These are only needed temporarily during graph
construction. For executing the compositor operations it is perfectly
sufficient to store only the direct input link pointers. A common
pointer indirection is avoided this way (which might also give a little
performance improvement).

== Avoid virtual recursive functions ==

Recursive virtual functions are evil. They are very hard to follow
during debugging. At least in the parts this patch is concerned with
these functions have been replaced by a non-virtual recursive core
function (which might then call virtual non-recursive functions if
needed). See for example NodeOperationBuilder::group_operations.
2014-04-15 16:28:10 +02:00
c1c26c36f6 Style Cleanup: remove preprocessor indentation (updated wiki style guide too) 2013-12-22 14:12:19 +11:00
b8d96bc011 mask motion blur shutter option 2012-07-27 10:20:36 +00:00
b10a35a9a9 motion blur for mask node:
TODO
- add shutter speed option
- add blur option
2012-07-27 09:32:47 +00:00
733edf8628 option to use manual size input for scene 2012-07-26 13:29:38 +00:00
33e12a2983 Highlight nodes that are being processed 2012-07-04 10:01:45 +00:00
0b0ac3aa9e remove scene from new compositor classes. only needs RenderData 2012-06-22 15:06:52 +00:00
a803ce42df negate previous commit flag, this way existing files dont loose their feather. 2012-06-21 12:45:53 +00:00
54156e2b82 option to disable feather, since its so slow - for interactively editing masks its useful to be able to disable.
also rename RNA to 'use_antialiasing'
2012-06-21 12:27:57 +00:00
cde4d72848 style cleanup: more nodes 2012-06-15 17:57:39 +00:00
ceffc2cd50 add Anti-Aliasing (very rough draft algorithm, NOT FINAL version) to raskter lib. Code is still quite messy but will be replaced when final algo comes in anyway. 2012-06-13 19:57:23 +00:00
16dededdf3 remove input socket of mask node, this wasnt used. 2012-06-12 18:36:49 +00:00
489fa2d108 remaining mask files from tomato. these wont get svn history carried over. 2012-06-04 15:49:58 +00:00