Commit Graph

13 Commits

Author SHA1 Message Date
Jeroen Bakker 25c02ea703 Cleanup: Add namespace to compositor. 2021-03-29 08:18:33 +02:00
Jeroen Bakker e2d362757f Cleanup: Add override keyword. 2021-03-24 17:56:29 +01:00
Jacques Lucke 91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton 3316853323 Cleanup: conform headers to have license first
Also remove doxy comments for licenses and add missing GPL header.
2019-02-18 08:22:11 +11:00
Campbell Barton 65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Campbell Barton d7f55c4ff5 Cleanup: comment block tabs 2018-11-14 17:10:56 +11:00
Campbell Barton 44d4a61ed0 Cleanup: replace doxy @ with backslash
The rest of Blender uses backslashes.
2018-09-05 14:56:29 +10:00
Campbell Barton f86c965d7f Cleanup: use conforming header guard 2018-08-08 11:49:51 +10:00
Lukas Tönne 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
Campbell Barton bde7e6c96b stule cleanup: node headers 2012-06-13 23:31:47 +00:00
Campbell Barton 7862b2fa13 style cleanup: compositor, pointer syntax, function brace placement, line length 2012-05-17 22:55:28 +00:00
Jeroen Bakker 044e818cf8 ____
`````|````` | |        |                        ..'''' 
     |      | |        |______               .''       
     |      | |        |                  ..'          
     |      | |_______ |___________ ....''             
               merge to TRUNK!

 * The old compositor is still available (Debug Menu: 200)

This commit was brought to you by:

Developers:
 * Monique Dewanchand
 * Jeroen Bakker
 * Dalai Felinto
 * Lukas Tönne

Review:
 * Brecht van Lommel

Testers:
 * Nate Wiebe
 * Wolfgang Faehnle
 * Carlo Andreacchio
 * Daniel Salazar
 * Artur Mag
 * Christian Krupa
 * Francesco Siddi
 * Dan McGrath
 * Bassam Kurdali

But mostly by the community:
Gold:

    Joshua Faulkner
    Michael Tiemann
    Francesco Paglia
    Blender Guru
    Blender Developers Fund

Silver:

    Pablo Vazquez
    Joel Heethaar
    Amrein Olivier
    Ilias Karasavvidis
    Thomas Kumlehn
    Sebastian Koenig
    Hannu Hoffrén
    Benjamin Dansie
    Fred M'ule
    Michel Vilain
    Bradley Cathey
    Gianmichele Mariani
    Gottfried Hofmann
    Bjørnar Frøyse
    Valentijn Bruning
    Paul Holmes
    Clemens Rudolph
    Juris Graphix
    David Strebel
    Ronan Zeegers
    François Tarlier
    Felipe Andres Esquivel Reed
    Olaf Beckman
    Jesus Alberto Olmos Linares
    Kajimba
    Maria Figueiredo
    Alexandr Galperin
    Francesco Siddi
    Julio Iglesias Lopez
    Kjartan Tysdal
    Thomas Torfs
    Film Works
    Teruyuki Nakamura
    Roger Luethi
    Benoit Bolsee
    Stefan Abrahamsen
    Andreas Mattijat
    Xavier Bouchoux
    Blender 3D Graphics and Animation
    Henk Vostermans
    Daniel Blanco Delgado
    BlenderDay/2011
    Bradley Cathey
    Matthieu Dupont de Dinechin
    Gianmichele Mariani
    Jérôme Scaillet

Bronze (Ivo Grigull, Dylan Urquidi, Philippe Derungs, Phil Beauchamp, Bruce Parrott, Mathieu Quiblier, Daniel Martinez, Leandro Inocencio, Lluc Romaní Brasó, 
Jonathan Williamson, Michael Ehlen, Karlis Stigis, Dreamsteep, Martin Lindelöf, Filippo Saracino, Douwe van der Veen, Olli Äkräs, Bruno D'Arcangeli, 
Francisco Sedrez Warmling, Watchmike.ca, peter lener, Matteo Novellino, Martin Kirsch, Austars Schnore, KC Elliott, Massimiliano Puliero, Karl Stein, 
Wood Design Studios, Omer Khan, Jyrki Kanto, Michał Krupa, Lars Brubaker, Neil Richmond, Adam Kalisz, Robert Garlington, Ian Wilson, Carlo Andreacchio, 
Jeremias Boos, Robert Holcomb, Gabriel Zöller, Robert Cude, Natibel de Leon, Nathan Turnage, Nicolas Vergnes, Philipp Kleinhenz, Norman Hartig, Louis Kreusel, 
Christopher Taylor, Giovanni Remondini, Daniel Rentzsch, Nico Partipilo, Thomas Ventresco, Johannes Schwarz, Александр Коротеев, Brendon Harvey, 
Marcelo G. Malheiros, Marius Giurgi, Richard Burns, Perttu Iso-Metsälä, Steve Bazin, Radoslav Borisov, Yoshiyuki Shida, Julien Guigner, Andrew Hunter, 
Philipp Oeser, Daniel Thul, Thobias Johansson, Mauro Bonecchi, Georg Piorczynski, Sebastian Michailidis, L M Weedy, Gen X, Stefan Hinze, Nicolò Zubbini, 
Erik Pusch, Rob Scott, Florian Koch, Charles Razack, Adrian Baker, Oliver Villar Diz, David Revoy, Julio Iglesias Lopez, Coen Spoor, Carlos Folch, 
Joseph Christie, Victor Hernández García, David Mcsween, James Finnerty, Cory Kruckenberg, Giacomo Graziosi, Olivier Saraja, Lars Brubaker, Eric Hudson, 
Johannes Schwarz, David Elguea, Marcus Schulderinsky, Karel De Bruijn, Lucas van Wijngaarden, Stefano Ciarrocchi, Mehmet Eribol, Thomas Berglund, Zuofei Song, 
Dylan Urquidi )
2012-05-17 12:49:33 +00:00