stule cleanup: node headers

This commit is contained in:
Campbell Barton 2012-06-13 23:31:47 +00:00
parent 906b9e0584
commit bde7e6c96b
226 changed files with 3184 additions and 3192 deletions

View File

@ -21,256 +21,256 @@
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @defgroup Model The data model of the compositor * @defgroup Model The data model of the compositor
* @defgroup Memory The memory management stuff * @defgroup Memory The memory management stuff
* @defgroup Execution The execution logic * @defgroup Execution The execution logic
* @defgroup Conversion Conversion logic * @defgroup Conversion Conversion logic
* @defgroup Node All nodes of the compositor * @defgroup Node All nodes of the compositor
* @defgroup Operation All operations of the compositor * @defgroup Operation All operations of the compositor
* *
* @mainpage Introduction of the Blender Compositor * @mainpage Introduction of the Blender Compositor
* *
* @section bcomp Blender compositor * @section bcomp Blender compositor
* This project redesigns the interals of Blender's compositor. The project has been executed in 2011 by At Mind. * This project redesigns the interals of Blender's compositor. The project has been executed in 2011 by At Mind.
* At Mind is a technology company located in Amsterdam, The Netherlands. * At Mind is a technology company located in Amsterdam, The Netherlands.
* The project has been crowdfunded. This code has been released under GPL2 to be used in Blender. * The project has been crowdfunded. This code has been released under GPL2 to be used in Blender.
* *
* @section goals The goals of the project * @section goals The goals of the project
* the new compositor has 2 goals. * the new compositor has 2 goals.
* - Make a faster compositor (speed of calculation) * - Make a faster compositor (speed of calculation)
* - Make the compositor work faster for you (workflow) * - Make the compositor work faster for you (workflow)
* *
* @section speed Faster compositor * @section speed Faster compositor
* The speedup has been done by making better use of the hardware Blenders is working on. The previous compositor only * The speedup has been done by making better use of the hardware Blenders is working on. The previous compositor only
* used a single threaded model to calculate a node. The only exception to this is the Defocus node. * used a single threaded model to calculate a node. The only exception to this is the Defocus node.
* Only when it is possible to calculate two full nodes in parallel a second thread was used. * Only when it is possible to calculate two full nodes in parallel a second thread was used.
* Current workstations have 8-16 threads available, and most of the time these are idle. * Current workstations have 8-16 threads available, and most of the time these are idle.
* *
* In the new compositor we want to use as much of threads as possible. Even new OpenCL capable GPU-hardware can be * In the new compositor we want to use as much of threads as possible. Even new OpenCL capable GPU-hardware can be
* used for calculation. * used for calculation.
* *
* @section workflow Work faster * @section workflow Work faster
* The previous compositor only showed the final image. The compositor could wait a long time before seeing the result * The previous compositor only showed the final image. The compositor could wait a long time before seeing the result
* of his work. The new compositor will work in a way that it will focus on getting information back to the user. * of his work. The new compositor will work in a way that it will focus on getting information back to the user.
* It will prioritise its work to get earlier user feedback. * It will prioritise its work to get earlier user feedback.
* *
* @page memory Memory model * @page memory Memory model
* The main issue is the type of memory model to use. Blender is used by consumers and professionals. * The main issue is the type of memory model to use. Blender is used by consumers and professionals.
* Ranging from low-end machines to very high-end machines. * Ranging from low-end machines to very high-end machines.
* The system should work on high-end machines and on low-end machines. * The system should work on high-end machines and on low-end machines.
* *
* *
* @page executing Executing * @page executing Executing
* @section prepare Prepare execution * @section prepare Prepare execution
* *
* during the preparation of the execution All ReadBufferOperation will receive an offset. * during the preparation of the execution All ReadBufferOperation will receive an offset.
* This offset is used during execution as an optimization trick * This offset is used during execution as an optimization trick
* Next all operations will be initialized for execution @see NodeOperation.initExecution * Next all operations will be initialized for execution @see NodeOperation.initExecution
* Next all ExecutionGroup's will be initialized for execution @see ExecutionGroup.initExecution * Next all ExecutionGroup's will be initialized for execution @see ExecutionGroup.initExecution
* this all is controlled from @see ExecutionSystem.execute * this all is controlled from @see ExecutionSystem.execute
* *
* @section priority Render priority * @section priority Render priority
* Render priority is an priority of an output node. A user has a different need of Render priorities of output nodes * Render priority is an priority of an output node. A user has a different need of Render priorities of output nodes
* than during editing. * than during editing.
* for example. the Active ViewerNode has top priority during editing, but during rendering a CompositeNode has. * for example. the Active ViewerNode has top priority during editing, but during rendering a CompositeNode has.
* All NodeOperation has a setting for their renderpriority, but only for output NodeOperation these have effect. * All NodeOperation has a setting for their renderpriority, but only for output NodeOperation these have effect.
* In ExecutionSystem.execute all priorities are checked. For every priority the ExecutionGroup's are check if the * In ExecutionSystem.execute all priorities are checked. For every priority the ExecutionGroup's are check if the
* priority do match. * priority do match.
* When match the ExecutionGroup will be executed (this happens in serial) * When match the ExecutionGroup will be executed (this happens in serial)
* *
* @see ExecutionSystem.execute control of the Render priority * @see ExecutionSystem.execute control of the Render priority
* @see NodeOperation.getRenderPriority receive the render priority * @see NodeOperation.getRenderPriority receive the render priority
* @see ExecutionGroup.execute the main loop to execute a whole ExecutionGroup * @see ExecutionGroup.execute the main loop to execute a whole ExecutionGroup
* *
* @section order Chunk order * @section order Chunk order
* *
* When a ExecutionGroup is executed, first the order of chunks are determined. * When a ExecutionGroup is executed, first the order of chunks are determined.
* The settings are stored in the ViewerNode inside the ExecutionGroup. ExecutionGroups that have no viewernode, * The settings are stored in the ViewerNode inside the ExecutionGroup. ExecutionGroups that have no viewernode,
* will use a default one. * will use a default one.
* There are several possible chunk orders * There are several possible chunk orders
* - [@ref OrderOfChunks.COM_TO_CENTER_OUT]: Start calculating from a configurable point and order by nearest chunk * - [@ref OrderOfChunks.COM_TO_CENTER_OUT]: Start calculating from a configurable point and order by nearest chunk
* - [@ref OrderOfChunks.COM_TO_RANDOM]: Randomize all chunks. * - [@ref OrderOfChunks.COM_TO_RANDOM]: Randomize all chunks.
* - [@ref OrderOfChunks.COM_TO_TOP_DOWN]: Start calculation from the bottom to the top of the image * - [@ref OrderOfChunks.COM_TO_TOP_DOWN]: Start calculation from the bottom to the top of the image
* - [@ref OrderOfChunks.COM_TO_RULE_OF_THIRDS]: Experimental order based on 9 hotspots in the image * - [@ref OrderOfChunks.COM_TO_RULE_OF_THIRDS]: Experimental order based on 9 hotspots in the image
* *
* When the chunkorder is determined, the first few chunks will be checked if they can be scheduled. * When the chunkorder is determined, the first few chunks will be checked if they can be scheduled.
* Chunks can have three states: * Chunks can have three states:
* - [@ref ChunkExecutionState.COM_ES_NOT_SCHEDULED]: Chunk is not yet scheduled, or dependacies are not met * - [@ref ChunkExecutionState.COM_ES_NOT_SCHEDULED]: Chunk is not yet scheduled, or dependacies are not met
* - [@ref ChunkExecutionState.COM_ES_SCHEDULED]: All dependacies are met, chunk is scheduled, but not finished * - [@ref ChunkExecutionState.COM_ES_SCHEDULED]: All dependacies are met, chunk is scheduled, but not finished
* - [@ref ChunkExecutionState.COM_ES_EXECUTED]: Chunk is finished * - [@ref ChunkExecutionState.COM_ES_EXECUTED]: Chunk is finished
* *
* @see ExecutionGroup.execute * @see ExecutionGroup.execute
* @see ViewerBaseOperation.getChunkOrder * @see ViewerBaseOperation.getChunkOrder
* @see OrderOfChunks * @see OrderOfChunks
* *
* @section interest Area of interest * @section interest Area of interest
* An ExecutionGroup can have dependancies to other ExecutionGroup's. Data passing from one ExecutionGroup to another * An ExecutionGroup can have dependancies to other ExecutionGroup's. Data passing from one ExecutionGroup to another
* one are stored in 'chunks'. * one are stored in 'chunks'.
* If not all input chunks are available the chunk execution will not be scheduled. * If not all input chunks are available the chunk execution will not be scheduled.
* <pre> * <pre>
* +-------------------------------------+ +--------------------------------------+ * +-------------------------------------+ +--------------------------------------+
* | ExecutionGroup A | | ExecutionGroup B | * | ExecutionGroup A | | ExecutionGroup B |
* | +----------------+ +-------------+ | | +------------+ +-----------------+ | * | +----------------+ +-------------+ | | +------------+ +-----------------+ |
* | | NodeOperation a| | WriteBuffer | | | | ReadBuffer | | ViewerOperation | | * | | NodeOperation a| | WriteBuffer | | | | ReadBuffer | | ViewerOperation | |
* | | *==* Operation | | | | Operation *===* | | * | | *==* Operation | | | | Operation *===* | |
* | | | | | | | | | | | | * | | | | | | | | | | | |
* | +----------------+ +-------------+ | | +------------+ +-----------------+ | * | +----------------+ +-------------+ | | +------------+ +-----------------+ |
* | | | | | | * | | | | | |
* +--------------------------------|----+ +---|----------------------------------+ * +--------------------------------|----+ +---|----------------------------------+
* | | * | |
* | | * | |
* +---------------------------+ * +---------------------------+
* | MemoryProxy | * | MemoryProxy |
* | +----------+ +---------+ | * | +----------+ +---------+ |
* | | Chunk a | | Chunk b | | * | | Chunk a | | Chunk b | |
* | | | | | | * | | | | | |
* | +----------+ +---------+ | * | +----------+ +---------+ |
* | | * | |
* +---------------------------+ * +---------------------------+
* </pre> * </pre>
* *
* In the above example ExecutionGroup B has an outputoperation (ViewerOperation) and is being executed. * In the above example ExecutionGroup B has an outputoperation (ViewerOperation) and is being executed.
* The first chunk is evaluated [@ref ExecutionGroup.scheduleChunkWhenPossible], * The first chunk is evaluated [@ref ExecutionGroup.scheduleChunkWhenPossible],
* but not all input chunks are available. The relevant ExecutionGroup (that can calculate the missing chunks; * but not all input chunks are available. The relevant ExecutionGroup (that can calculate the missing chunks;
* ExecutionGroup A) is asked to calculate the area ExecutionGroup B is missing. * ExecutionGroup A) is asked to calculate the area ExecutionGroup B is missing.
* [@ref ExecutionGroup.scheduleAreaWhenPossible] * [@ref ExecutionGroup.scheduleAreaWhenPossible]
* ExecutionGroup B checks what chunks the area spans, and tries to schedule these chunks. * ExecutionGroup B checks what chunks the area spans, and tries to schedule these chunks.
* If all input data is available these chunks are scheduled [@ref ExecutionGroup.scheduleChunk] * If all input data is available these chunks are scheduled [@ref ExecutionGroup.scheduleChunk]
* *
* <pre> * <pre>
* *
* +-------------------------+ +----------------+ +----------------+ * +-------------------------+ +----------------+ +----------------+
* | ExecutionSystem.execute | | ExecutionGroup | | ExecutionGroup | * | ExecutionSystem.execute | | ExecutionGroup | | ExecutionGroup |
* +-------------------------+ | (B) | | (A) | * +-------------------------+ | (B) | | (A) |
* O +----------------+ +----------------+ * O +----------------+ +----------------+
* O | | * O | |
* O ExecutionGroup.execute | | * O ExecutionGroup.execute | |
* O------------------------------->O | * O------------------------------->O |
* . O | * . O |
* . O-------\ | * . O-------\ |
* . . | ExecutionGroup.scheduleChunkWhenPossible * . . | ExecutionGroup.scheduleChunkWhenPossible
* . . O----/ (*) | * . . O----/ (*) |
* . . O | * . . O |
* . . O | * . . O |
* . . O ExecutionGroup.scheduleAreaWhenPossible| * . . O ExecutionGroup.scheduleAreaWhenPossible|
* . . O---------------------------------------->O * . . O---------------------------------------->O
* . . . O----------\ ExecutionGroup.scheduleChunkWhenPossible * . . . O----------\ ExecutionGroup.scheduleChunkWhenPossible
* . . . . | (*) * . . . . | (*)
* . . . . O-------/ * . . . . O-------/
* . . . . O * . . . . O
* . . . . O * . . . . O
* . . . . O-------\ ExecutionGroup.scheduleChunk * . . . . O-------\ ExecutionGroup.scheduleChunk
* . . . . . | * . . . . . |
* . . . . . O----/ * . . . . . O----/
* . . . . O<=O * . . . . O<=O
* . . . O<=O * . . . O<=O
* . . . O * . . . O
* . . O<========================================O * . . O<========================================O
* . . O | * . . O |
* . O<=O | * . O<=O |
* . O | * . O |
* . O | * . O |
* </pre> * </pre>
* *
* This happens until all chunks of (ExecutionGroup B) are finished executing or the user break's the process. * This happens until all chunks of (ExecutionGroup B) are finished executing or the user break's the process.
* *
* NodeOperation like the ScaleOperation can influence the area of interest by reimplementing the * NodeOperation like the ScaleOperation can influence the area of interest by reimplementing the
* [@ref NodeOperation.determineAreaOfInterest] method * [@ref NodeOperation.determineAreaOfInterest] method
* *
* <pre> * <pre>
* *
* +--------------------------+ +---------------------------------+ * +--------------------------+ +---------------------------------+
* | ExecutionGroup A | | ExecutionGroup B | * | ExecutionGroup A | | ExecutionGroup B |
* | | | | * | | | |
* +--------------------------+ +---------------------------------+ * +--------------------------+ +---------------------------------+
* Needed chunks from ExecutionGroup A | Chunk of ExecutionGroup B (to be evaluated) * Needed chunks from ExecutionGroup A | Chunk of ExecutionGroup B (to be evaluated)
* +-------+ +-------+ | +--------+ * +-------+ +-------+ | +--------+
* |Chunk 1| |Chunk 2| +----------------+ |Chunk 1 | * |Chunk 1| |Chunk 2| +----------------+ |Chunk 1 |
* | | | | | ScaleOperation | | | * | | | | | ScaleOperation | | |
* +-------+ +-------+ +----------------+ +--------+ * +-------+ +-------+ +----------------+ +--------+
* *
* +-------+ +-------+ * +-------+ +-------+
* |Chunk 3| |Chunk 4| * |Chunk 3| |Chunk 4|
* | | | | * | | | |
* +-------+ +-------+ * +-------+ +-------+
* *
* </pre> * </pre>
* *
* @see ExecutionGroup.execute Execute a complete ExecutionGroup. Halts until finished or breaked by user * @see ExecutionGroup.execute Execute a complete ExecutionGroup. Halts until finished or breaked by user
* @see ExecutionGroup.scheduleChunkWhenPossible Tries to schedule a single chunk, * @see ExecutionGroup.scheduleChunkWhenPossible Tries to schedule a single chunk,
* checks if all input data is available. Can trigger dependant chunks to be calculated * checks if all input data is available. Can trigger dependant chunks to be calculated
* @see ExecutionGroup.scheduleAreaWhenPossible Tries to schedule an area. This can be multiple chunks * @see ExecutionGroup.scheduleAreaWhenPossible Tries to schedule an area. This can be multiple chunks
* (is called from [@ref ExecutionGroup.scheduleChunkWhenPossible]) * (is called from [@ref ExecutionGroup.scheduleChunkWhenPossible])
* @see ExecutionGroup.scheduleChunk Schedule a chunk on the WorkScheduler * @see ExecutionGroup.scheduleChunk Schedule a chunk on the WorkScheduler
* @see NodeOperation.determineDependingAreaOfInterest Influence the area of interest of a chunk. * @see NodeOperation.determineDependingAreaOfInterest Influence the area of interest of a chunk.
* @see WriteBufferOperation NodeOperation to write to a MemoryProxy/MemoryBuffer * @see WriteBufferOperation NodeOperation to write to a MemoryProxy/MemoryBuffer
* @see ReadBufferOperation NodeOperation to read from a MemoryProxy/MemoryBuffer * @see ReadBufferOperation NodeOperation to read from a MemoryProxy/MemoryBuffer
* @see MemoryProxy proxy for information about memory image (a image consist out of multiple chunks) * @see MemoryProxy proxy for information about memory image (a image consist out of multiple chunks)
* @see MemoryBuffer Allocated memory for a single chunk * @see MemoryBuffer Allocated memory for a single chunk
* *
* @section workscheduler WorkScheduler * @section workscheduler WorkScheduler
* the WorkScheduler is implemented as a static class. the responsibility of the WorkScheduler is to balance * the WorkScheduler is implemented as a static class. the responsibility of the WorkScheduler is to balance
* WorkPackages to the available and free devices. * WorkPackages to the available and free devices.
* the workscheduler can work in 2 states. For witching these between the state you need to recompile blender * the workscheduler can work in 2 states. For witching these between the state you need to recompile blender
* *
* @subsection multithread Multi threaded * @subsection multithread Multi threaded
* Default the workscheduler will place all work as WorkPackage in a queue. * Default the workscheduler will place all work as WorkPackage in a queue.
* For every CPUcore a working thread is created. These working threads will ask the WorkScheduler if there is work * For every CPUcore a working thread is created. These working threads will ask the WorkScheduler if there is work
* for a specific Device. * for a specific Device.
* the workscheduler will find work for the device and the device will be asked to execute the WorkPackage * the workscheduler will find work for the device and the device will be asked to execute the WorkPackage
* @subsection singlethread Single threaded * @subsection singlethread Single threaded
* For debugging reasons the multi-threading can be disabled. This is done by changing the COM_CURRENT_THREADING_MODEL * For debugging reasons the multi-threading can be disabled. This is done by changing the COM_CURRENT_THREADING_MODEL
* to COM_TM_NOTHREAD. When compiling the workscheduler * to COM_TM_NOTHREAD. When compiling the workscheduler
* will be changes to support no threading and run everything on the CPU. * will be changes to support no threading and run everything on the CPU.
* *
* @section devices Devices * @section devices Devices
* A Device within the compositor context is a Hardware component that can used to calculate chunks. * A Device within the compositor context is a Hardware component that can used to calculate chunks.
* This chunk is encapseled in a WorkPackage. * This chunk is encapseled in a WorkPackage.
* the WorkScheduler controls the devices and selects the device where a WorkPackage will be calculated. * the WorkScheduler controls the devices and selects the device where a WorkPackage will be calculated.
* *
* @subsection WS_Devices Workscheduler * @subsection WS_Devices Workscheduler
* The WorkScheduler controls all Devices. When initializing the compositor the WorkScheduler selects * The WorkScheduler controls all Devices. When initializing the compositor the WorkScheduler selects
* all devices that will be used during compositor. * all devices that will be used during compositor.
* There are two types of Devices, CPUDevice and OpenCLDevice. * There are two types of Devices, CPUDevice and OpenCLDevice.
* When an ExecutionGroup schedules a Chunk the schedule method of the WorkScheduler * When an ExecutionGroup schedules a Chunk the schedule method of the WorkScheduler
* The Workscheduler determines if the chunk can be run on an OpenCLDevice * The Workscheduler determines if the chunk can be run on an OpenCLDevice
* (and that there are available OpenCLDevice). If this is the case the chunk will be added to the worklist for * (and that there are available OpenCLDevice). If this is the case the chunk will be added to the worklist for
* OpenCLDevice's * OpenCLDevice's
* otherwise the chunk will be added to the worklist of CPUDevices. * otherwise the chunk will be added to the worklist of CPUDevices.
* *
* A thread will read the work-list and sends a workpackage to its device. * A thread will read the work-list and sends a workpackage to its device.
* *
* @see WorkScheduler.schedule method that is called to schedule a chunk * @see WorkScheduler.schedule method that is called to schedule a chunk
* @see Device.execute method called to execute a chunk * @see Device.execute method called to execute a chunk
* *
* @subsection CPUDevice CPUDevice * @subsection CPUDevice CPUDevice
* When a CPUDevice gets a WorkPackage the Device will get the inputbuffer that is needed to calculate the chunk. * When a CPUDevice gets a WorkPackage the Device will get the inputbuffer that is needed to calculate the chunk.
* Allocation is already done by the ExecutionGroup. * Allocation is already done by the ExecutionGroup.
* The outputbuffer of the chunk is being created. * The outputbuffer of the chunk is being created.
* The OutputOperation of the ExecutionGroup is called to execute the area of the outputbuffer. * The OutputOperation of the ExecutionGroup is called to execute the area of the outputbuffer.
* *
* @see ExecutionGroup * @see ExecutionGroup
* @see NodeOperation.executeRegion executes a single chunk of a NodeOperation * @see NodeOperation.executeRegion executes a single chunk of a NodeOperation
* @see CPUDevice.execute * @see CPUDevice.execute
* *
* @subsection GPUDevice OpenCLDevice * @subsection GPUDevice OpenCLDevice
* *
* To be completed! * To be completed!
* @see NodeOperation.executeOpenCLRegion * @see NodeOperation.executeOpenCLRegion
* @see OpenCLDevice.execute * @see OpenCLDevice.execute
* *
* @section executePixel executing a pixel * @section executePixel executing a pixel
* Finally the last step, the node functionality :) * Finally the last step, the node functionality :)
* @page newnode Creating new nodes * @page newnode Creating new nodes
*/ */
/** /**
* @brief The main method that is used to execute the compositor tree. * @brief The main method that is used to execute the compositor tree.

View File

@ -24,9 +24,9 @@
#define _COM_defines_h_ #define _COM_defines_h_
/** /**
* @brief possible data types for SocketConnection * @brief possible data types for SocketConnection
* @ingroup Model * @ingroup Model
*/ */
typedef enum DataType { typedef enum DataType {
/** @brief Unknown data type (or not yet known) */ /** @brief Unknown data type (or not yet known) */
COM_DT_UNKNOWN = 0, COM_DT_UNKNOWN = 0,
@ -39,13 +39,13 @@ typedef enum DataType {
} DataType; } DataType;
/** /**
* @brief Possible quality settings * @brief Possible quality settings
* @see CompositorContext.quality * @see CompositorContext.quality
* @ingroup Execution * @ingroup Execution
*/ */
typedef enum CompositorQuality { typedef enum CompositorQuality {
/** @brief High quality setting */ /** @brief High quality setting */
COM_QUALITY_HIGH = 0 , COM_QUALITY_HIGH = 0,
/** @brief Medium quality setting */ /** @brief Medium quality setting */
COM_QUALITY_MEDIUM = 1, COM_QUALITY_MEDIUM = 1,
/** @brief Low quality setting */ /** @brief Low quality setting */
@ -53,12 +53,12 @@ typedef enum CompositorQuality {
} CompositorQuality; } CompositorQuality;
/** /**
* @brief Possible priority settings * @brief Possible priority settings
* @ingroup Execution * @ingroup Execution
*/ */
typedef enum CompositorPriority { typedef enum CompositorPriority {
/** @brief High quality setting */ /** @brief High quality setting */
COM_PRIORITY_HIGH = 2 , COM_PRIORITY_HIGH = 2,
/** @brief Medium quality setting */ /** @brief Medium quality setting */
COM_PRIORITY_MEDIUM = 1, COM_PRIORITY_MEDIUM = 1,
/** @brief Low quality setting */ /** @brief Low quality setting */
@ -74,24 +74,24 @@ typedef enum CompositorPriority {
// workscheduler threading models // workscheduler threading models
/** /**
* COM_TM_QUEUE is a multithreaded model, which uses the BLI_thread_queue pattern. This is the default option. * COM_TM_QUEUE is a multithreaded model, which uses the BLI_thread_queue pattern. This is the default option.
*/ */
#define COM_TM_QUEUE 1 #define COM_TM_QUEUE 1
/** /**
* COM_TM_NOTHREAD is a single threading model, everything is executed in the caller thread. easy for debugging * COM_TM_NOTHREAD is a single threading model, everything is executed in the caller thread. easy for debugging
*/ */
#define COM_TM_NOTHREAD 0 #define COM_TM_NOTHREAD 0
/** /**
* COM_CURRENT_THREADING_MODEL can be one of the above, COM_TM_QUEUE is currently default. * COM_CURRENT_THREADING_MODEL can be one of the above, COM_TM_QUEUE is currently default.
*/ */
#define COM_CURRENT_THREADING_MODEL COM_TM_QUEUE #define COM_CURRENT_THREADING_MODEL COM_TM_QUEUE
// chunk order // chunk order
/** /**
* @brief The order of chunks to be scheduled * @brief The order of chunks to be scheduled
* @ingroup Execution * @ingroup Execution
*/ */
typedef enum OrderOfChunks { typedef enum OrderOfChunks {
/** @brief order from a distance to centerX/centerY */ /** @brief order from a distance to centerX/centerY */
COM_TO_CENTER_OUT = 0, COM_TO_CENTER_OUT = 0,

View File

@ -26,15 +26,15 @@
#include "COM_Device.h" #include "COM_Device.h"
/** /**
* @brief class representing a CPU device. * @brief class representing a CPU device.
* @note for every hardware thread in the system a CPUDevice instance will exist in the workscheduler * @note for every hardware thread in the system a CPUDevice instance will exist in the workscheduler
*/ */
class CPUDevice: public Device { class CPUDevice : public Device {
public: public:
/** /**
* @brief execute a WorkPackage * @brief execute a WorkPackage
* @param work the WorkPackage to execute * @param work the WorkPackage to execute
*/ */
void execute(WorkPackage *work); void execute(WorkPackage *work);
}; };

View File

@ -32,9 +32,9 @@
using namespace std; using namespace std;
/** /**
* @brief List of possible channel types * @brief List of possible channel types
* @ingroup Model * @ingroup Model
*/ */
typedef enum ChannelType { typedef enum ChannelType {
COM_CT_ColorComponent /** @brief this channel is contains color information. Specific used is determined by channelnumber, and in the future color space */, COM_CT_ColorComponent /** @brief this channel is contains color information. Specific used is determined by channelnumber, and in the future color space */,
COM_CT_Alpha /** @brief this channel is contains transparency value */, COM_CT_Alpha /** @brief this channel is contains transparency value */,
@ -47,31 +47,31 @@ typedef enum ChannelType {
} ChannelType; } ChannelType;
/** /**
* @brief ChannelInfo holds information about a channel. * @brief ChannelInfo holds information about a channel.
* *
* Channels are transported from node to node via a SocketConnection. * Channels are transported from node to node via a SocketConnection.
* ChannelInfo holds specific setting of these channels in order that the to-node of the connection * ChannelInfo holds specific setting of these channels in order that the to-node of the connection
* Can handle specific logic per channel setting. * Can handle specific logic per channel setting.
* *
* @note currently this is not used, but a future place to implement color spacing and other things. * @note currently this is not used, but a future place to implement color spacing and other things.
* @ingroup Model * @ingroup Model
*/ */
class ChannelInfo { class ChannelInfo {
private: private:
/** /**
* @brief the channel number, in the connection. [0-3] * @brief the channel number, in the connection. [0-3]
*/ */
int number; int number;
/** /**
* @brief type of channel * @brief type of channel
*/ */
ChannelType type; ChannelType type;
/** /**
* @brieg Is this value in this channel premultiplied with its alpha * @brieg Is this value in this channel premultiplied with its alpha
* @note only valid if type = ColorComponent; * @note only valid if type = ColorComponent;
*/ */
bool premultiplied; bool premultiplied;
// /** // /**
@ -82,39 +82,39 @@ private:
public: public:
/** /**
* @brief creates a new ChannelInfo and set default values * @brief creates a new ChannelInfo and set default values
*/ */
ChannelInfo(); ChannelInfo();
/** /**
* @brief set the index of this channel in the SocketConnection * @brief set the index of this channel in the SocketConnection
*/ */
void setNumber(const int number) { this->number = number; } void setNumber(const int number) { this->number = number; }
/** /**
* @brief get the index of this channel in the SocketConnection * @brief get the index of this channel in the SocketConnection
*/ */
const int getNumber() const {return this->number; } const int getNumber() const { return this->number; }
/** /**
* @brief set the type of channel * @brief set the type of channel
*/ */
void setType(const ChannelType type) { this->type = type; } void setType(const ChannelType type) { this->type = type; }
/** /**
* @brief get the type of channel * @brief get the type of channel
*/ */
const ChannelType getType() const {return this->type; } const ChannelType getType() const { return this->type; }
/** /**
* @brief set the premultiplicatioin of this channel * @brief set the premultiplicatioin of this channel
*/ */
void setPremultiplied(const bool premultiplied) { this->premultiplied = premultiplied; } void setPremultiplied(const bool premultiplied) { this->premultiplied = premultiplied; }
/** /**
* @brief is this channel premultiplied * @brief is this channel premultiplied
*/ */
const bool isPremultiplied() const {return this->premultiplied;} const bool isPremultiplied() const { return this->premultiplied; }
}; };

View File

@ -35,11 +35,11 @@ public:
void determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots); void determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots);
friend bool operator<(const ChunkOrder& a, const ChunkOrder& b); friend bool operator<(const ChunkOrder& a, const ChunkOrder& b);
void setChunkNumber(unsigned int chunknumber) {this->number = chunknumber;} void setChunkNumber(unsigned int chunknumber) { this->number = chunknumber; }
void setX(int x) {this->x = x;} void setX(int x) { this->x = x; }
void setY(int y) {this->y = y;} void setY(int y) { this->y = y; }
unsigned int getChunkNumber() {return this->number;} unsigned int getChunkNumber() { return this->number; }
double getDistance() {return this->distance;} double getDistance() { return this->distance; }
}; };
#endif #endif

View File

@ -32,36 +32,36 @@
#include "COM_defines.h" #include "COM_defines.h"
/** /**
* @brief Overall context of the compositor * @brief Overall context of the compositor
*/ */
class CompositorContext { class CompositorContext {
private: private:
/** /**
* @brief The rendering field describes if we are rendering (F12) or if we are editing (Node editor) * @brief The rendering field describes if we are rendering (F12) or if we are editing (Node editor)
* This field is initialized in ExecutionSystem and must only be read from that point on. * This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem * @see ExecutionSystem
*/ */
bool rendering; bool rendering;
/** /**
* @brief The quality of the composite. * @brief The quality of the composite.
* This field is initialized in ExecutionSystem and must only be read from that point on. * This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem * @see ExecutionSystem
*/ */
CompositorQuality quality; CompositorQuality quality;
/** /**
* @brief Reference to the scene that is being composited. * @brief Reference to the scene that is being composited.
* This field is initialized in ExecutionSystem and must only be read from that point on. * This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem * @see ExecutionSystem
*/ */
Scene *scene; Scene *scene;
/** /**
* @brief reference to the bNodeTree * @brief reference to the bNodeTree
* This field is initialized in ExecutionSystem and must only be read from that point on. * This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem * @see ExecutionSystem
*/ */
bNodeTree *bnodetree; bNodeTree *bnodetree;
/** /**
@ -70,90 +70,90 @@ private:
bNode *activegNode; bNode *activegNode;
/** /**
* @brief does this system have active opencl devices? * @brief does this system have active opencl devices?
*/ */
bool hasActiveOpenCLDevices; bool hasActiveOpenCLDevices;
public: public:
/** /**
* @brief constructor initializes the context with default values. * @brief constructor initializes the context with default values.
*/ */
CompositorContext(); CompositorContext();
/** /**
* @brief set the rendering field of the context * @brief set the rendering field of the context
*/ */
void setRendering(bool rendering) { this->rendering = rendering; } void setRendering(bool rendering) { this->rendering = rendering; }
/** /**
* @brief get the rendering field of the context * @brief get the rendering field of the context
*/ */
bool isRendering() const {return this->rendering;} bool isRendering() const { return this->rendering; }
/** /**
* @brief set the scene of the context * @brief set the scene of the context
*/ */
void setScene(Scene *scene) {this->scene = scene;} void setScene(Scene *scene) { this->scene = scene; }
/** /**
* @brief set the bnodetree of the context * @brief set the bnodetree of the context
*/ */
void setbNodeTree(bNodeTree *bnodetree) {this->bnodetree = bnodetree;} void setbNodeTree(bNodeTree *bnodetree) { this->bnodetree = bnodetree; }
/** /**
* @brief get the bnodetree of the context * @brief get the bnodetree of the context
*/ */
const bNodeTree * getbNodeTree() const {return this->bnodetree;} const bNodeTree *getbNodeTree() const { return this->bnodetree; }
/** /**
* @brief set the active groupnode of the context * @brief set the active groupnode of the context
*/ */
void setActivegNode(bNode *gnode) {this->activegNode = gnode;} void setActivegNode(bNode *gnode) { this->activegNode = gnode; }
/** /**
* @brief get the active groupnode of the context * @brief get the active groupnode of the context
*/ */
const bNode * getActivegNode() const {return this->activegNode;} const bNode *getActivegNode() const { return this->activegNode; }
/** /**
* @brief get the scene of the context * @brief get the scene of the context
*/ */
const Scene *getScene() const {return this->scene;} const Scene *getScene() const { return this->scene; }
/** /**
* @brief set the quality * @brief set the quality
*/ */
void setQuality(CompositorQuality quality) { void setQuality(CompositorQuality quality) {
this->quality = quality; this->quality = quality;
} }
/** /**
* @brief get the quality * @brief get the quality
*/ */
const CompositorQuality getQuality() const { const CompositorQuality getQuality() const {
return quality; return quality;
} }
/** /**
* @brief get the current framenumber of the scene in this context * @brief get the current framenumber of the scene in this context
*/ */
const int getFramenumber() const; const int getFramenumber() const;
/** /**
* @brief has this system active openclDevices? * @brief has this system active openclDevices?
*/ */
const bool getHasActiveOpenCLDevices() const { const bool getHasActiveOpenCLDevices() const {
return this->hasActiveOpenCLDevices; return this->hasActiveOpenCLDevices;
} }
/** /**
* @brief set has this system active openclDevices? * @brief set has this system active openclDevices?
*/ */
void setHasActiveOpenCLDevices(bool hasAvtiveOpenCLDevices) { void setHasActiveOpenCLDevices(bool hasAvtiveOpenCLDevices) {
this->hasActiveOpenCLDevices = hasAvtiveOpenCLDevices; this->hasActiveOpenCLDevices = hasAvtiveOpenCLDevices;
} }
int getChunksize() {return this->getbNodeTree()->chunksize;} int getChunksize() { return this->getbNodeTree()->chunksize; }
const int isColorManaged() const; const int isColorManaged() const;
}; };

View File

@ -32,39 +32,39 @@
class Converter { class Converter {
public: public:
/** /**
* @brief Convert/wraps a bNode in its Node instance. * @brief Convert/wraps a bNode in its Node instance.
* *
* For all nodetypes a wrapper class is created. * For all nodetypes a wrapper class is created.
* Muted nodes are wrapped with MuteNode. * Muted nodes are wrapped with MuteNode.
* *
* @note When adding a new node to blender, this method needs to be changed to return the correct Node instance. * @note When adding a new node to blender, this method needs to be changed to return the correct Node instance.
* *
* @see Node * @see Node
* @see MuteNode * @see MuteNode
*/ */
static Node *convert(bNode *bNode); static Node *convert(bNode *bNode);
/** /**
* @brief This method will add a datetype conversion rule when the to-socket does not support the from-socket actual data type. * @brief This method will add a datetype conversion rule when the to-socket does not support the from-socket actual data type.
* *
* @note this method is called when conversion is needed. * @note this method is called when conversion is needed.
* *
* @param connection the SocketConnection what needs conversion * @param connection the SocketConnection what needs conversion
* @param system the ExecutionSystem to add the conversion to. * @param system the ExecutionSystem to add the conversion to.
* @see SocketConnection - a link between two sockets * @see SocketConnection - a link between two sockets
*/ */
static void convertDataType(SocketConnection *connection, ExecutionSystem *system); static void convertDataType(SocketConnection *connection, ExecutionSystem *system);
/** /**
* @brief This method will add a resolution rule based on the settings of the InputSocket. * @brief This method will add a resolution rule based on the settings of the InputSocket.
* *
* @note Conversion logic is implemented in this method * @note Conversion logic is implemented in this method
* @see InputSocketResizeMode for the possible conversions. * @see InputSocketResizeMode for the possible conversions.
* @param connection the SocketConnection what needs conversion * @param connection the SocketConnection what needs conversion
* @param system the ExecutionSystem to add the conversion to. * @param system the ExecutionSystem to add the conversion to.
* @see SocketConnection - a link between two sockets * @see SocketConnection - a link between two sockets
*/ */
static void convertResolution(SocketConnection *connection, ExecutionSystem *system); static void convertResolution(SocketConnection *connection, ExecutionSystem *system);
}; };
#endif #endif

View File

@ -30,26 +30,26 @@
#include "COM_MemoryBuffer.h" #include "COM_MemoryBuffer.h"
/** /**
* @brief Abstract class for device implementations to be used by the Compositor. * @brief Abstract class for device implementations to be used by the Compositor.
* devices are queried, initialized and used by the WorkScheduler. * devices are queried, initialized and used by the WorkScheduler.
* work are packaged as a WorkPackage instance. * work are packaged as a WorkPackage instance.
*/ */
class Device { class Device {
public: public:
/** /**
* @brief initialize the device * @brief initialize the device
*/ */
virtual bool initialize() {return true;} virtual bool initialize() { return true; }
/** /**
* @brief deinitialize the device * @brief deinitialize the device
*/ */
virtual void deinitialize() {} virtual void deinitialize() {}
/** /**
* @brief execute a WorkPackage * @brief execute a WorkPackage
* @param work the WorkPackage to execute * @param work the WorkPackage to execute
*/ */
virtual void execute(WorkPackage *work) = 0; virtual void execute(WorkPackage *work) = 0;
}; };

View File

@ -33,21 +33,21 @@
/** /**
* @brief the execution state of a chunk in an ExecutionGroup * @brief the execution state of a chunk in an ExecutionGroup
* @ingroup Execution * @ingroup Execution
*/ */
typedef enum ChunkExecutionState { typedef enum ChunkExecutionState {
/** /**
* @brief chunk is not yet scheduled * @brief chunk is not yet scheduled
*/ */
COM_ES_NOT_SCHEDULED = 0, COM_ES_NOT_SCHEDULED = 0,
/** /**
* @brief chunk is scheduled, but not yet executed * @brief chunk is scheduled, but not yet executed
*/ */
COM_ES_SCHEDULED = 1, COM_ES_SCHEDULED = 1,
/** /**
* @brief chunk is executed. * @brief chunk is executed.
*/ */
COM_ES_EXECUTED = 2 COM_ES_EXECUTED = 2
} ChunkExecutionState; } ChunkExecutionState;
@ -56,64 +56,64 @@ class ReadBufferOperation;
class Device; class Device;
/** /**
* @brief Class ExecutionGroup is a group of NodeOperations that are executed as one. * @brief Class ExecutionGroup is a group of NodeOperations that are executed as one.
* This grouping is used to combine Operations that can be executed as one whole when multi-processing. * This grouping is used to combine Operations that can be executed as one whole when multi-processing.
* @ingroup Execution * @ingroup Execution
*/ */
class ExecutionGroup { class ExecutionGroup {
private: private:
// fields // fields
/** /**
* @brief list of operations in this ExecutionGroup * @brief list of operations in this ExecutionGroup
*/ */
vector<NodeOperation*> operations; vector<NodeOperation *> operations;
/** /**
* @brief is this ExecutionGroup an input ExecutionGroup * @brief is this ExecutionGroup an input ExecutionGroup
* an input execution group is a group that is at the end of the calculation (the output is important for the user) * an input execution group is a group that is at the end of the calculation (the output is important for the user)
*/ */
int isOutput; int isOutput;
/** /**
* @brief Width of the output * @brief Width of the output
*/ */
unsigned int width; unsigned int width;
/** /**
* @brief Height of the output * @brief Height of the output
*/ */
unsigned int height; unsigned int height;
/** /**
* @brief size of a single chunk, being Width or of height * @brief size of a single chunk, being Width or of height
* a chunk is always a square, except at the edges of the MemoryBuffer * a chunk is always a square, except at the edges of the MemoryBuffer
*/ */
unsigned int chunkSize; unsigned int chunkSize;
/** /**
* @brief number of chunks in the x-axis * @brief number of chunks in the x-axis
*/ */
unsigned int numberOfXChunks; unsigned int numberOfXChunks;
/** /**
* @brief number of chunks in the y-axis * @brief number of chunks in the y-axis
*/ */
unsigned int numberOfYChunks; unsigned int numberOfYChunks;
/** /**
* @brief total number of chunks * @brief total number of chunks
*/ */
unsigned int numberOfChunks; unsigned int numberOfChunks;
/** /**
* @brief contains this ExecutionGroup a complex NodeOperation. * @brief contains this ExecutionGroup a complex NodeOperation.
*/ */
bool complex; bool complex;
/** /**
* @brief can this ExecutionGroup be scheduled on an OpenCLDevice * @brief can this ExecutionGroup be scheduled on an OpenCLDevice
*/ */
bool openCL; bool openCL;
/** /**
@ -122,113 +122,113 @@ private:
bool singleThreaded; bool singleThreaded;
/** /**
* @brief what is the maximum number field of all ReadBufferOperation in this ExecutionGroup. * @brief what is the maximum number field of all ReadBufferOperation in this ExecutionGroup.
* @note this is used to construct the MemoryBuffers that will be passed during execution. * @note this is used to construct the MemoryBuffers that will be passed during execution.
*/ */
unsigned int cachedMaxReadBufferOffset; unsigned int cachedMaxReadBufferOffset;
/** /**
* @brief a cached vector of all read operations in the execution group. * @brief a cached vector of all read operations in the execution group.
*/ */
vector<NodeOperation*> cachedReadOperations; vector<NodeOperation *> cachedReadOperations;
/** /**
* @brief reference to the original bNodeTree, this field is only set for the 'top' execution group. * @brief reference to the original bNodeTree, this field is only set for the 'top' execution group.
* @note can only be used to call the callbacks for progress, status and break * @note can only be used to call the callbacks for progress, status and break
*/ */
const bNodeTree * bTree; const bNodeTree *bTree;
/** /**
* @brief total number of chunks that have been calculated for this ExecutionGroup * @brief total number of chunks that have been calculated for this ExecutionGroup
*/ */
unsigned int chunksFinished; unsigned int chunksFinished;
/** /**
* @brief the chunkExecutionStates holds per chunk the execution state. this state can be * @brief the chunkExecutionStates holds per chunk the execution state. this state can be
* - COM_ES_NOT_SCHEDULED: not scheduled * - COM_ES_NOT_SCHEDULED: not scheduled
* - COM_ES_SCHEDULED: scheduled * - COM_ES_SCHEDULED: scheduled
* - COM_ES_EXECUTED: executed * - COM_ES_EXECUTED: executed
*/ */
ChunkExecutionState *chunkExecutionStates; ChunkExecutionState *chunkExecutionStates;
/** /**
* @brief indicator when this ExecutionGroup has valid NodeOperations in its vector for Execution * @brief indicator when this ExecutionGroup has valid NodeOperations in its vector for Execution
* @note When building the ExecutionGroup NodeOperations are added via recursion. First a WriteBufferOperations is added, then the * @note When building the ExecutionGroup NodeOperations are added via recursion. First a WriteBufferOperations is added, then the
* @note Operation containing the settings that is important for the ExecutiongGroup is added, * @note Operation containing the settings that is important for the ExecutiongGroup is added,
* @note When this occurs, these settings are copied over from the node to the ExecutionGroup * @note When this occurs, these settings are copied over from the node to the ExecutionGroup
* @note and the Initialized flag is set to true. * @note and the Initialized flag is set to true.
* @see complex * @see complex
* @see openCL * @see openCL
*/ */
bool initialized; bool initialized;
// methods // methods
/** /**
* @brief check whether parameter operation can be added to the execution group * @brief check whether parameter operation can be added to the execution group
* @param operation the operation to be added * @param operation the operation to be added
*/ */
bool canContainOperation(NodeOperation *operation); bool canContainOperation(NodeOperation *operation);
/** /**
* @brief calculate the actual chunk size of this execution group. * @brief calculate the actual chunk size of this execution group.
* @note A chunk size is an unsigned int that is both the height and width of a chunk. * @note A chunk size is an unsigned int that is both the height and width of a chunk.
* @note The chunk size will not be stored in the chunkSize field. This needs to be done * @note The chunk size will not be stored in the chunkSize field. This needs to be done
* @note by the calling method. * @note by the calling method.
*/ */
unsigned int determineChunkSize(); unsigned int determineChunkSize();
/** /**
* @brief Determine the rect (minx, maxx, miny, maxy) of a chunk at a position. * @brief Determine the rect (minx, maxx, miny, maxy) of a chunk at a position.
* @note Only gives usefull results ater the determination of the chunksize * @note Only gives usefull results ater the determination of the chunksize
* @see determineChunkSize() * @see determineChunkSize()
*/ */
void determineChunkRect(rcti *rect, const unsigned int xChunk, const unsigned int yChunk) const; void determineChunkRect(rcti *rect, const unsigned int xChunk, const unsigned int yChunk) const;
/** /**
* @brief determine the number of chunks, based on the chunkSize, width and height. * @brief determine the number of chunks, based on the chunkSize, width and height.
* @note The result are stored in the fields numberOfChunks, numberOfXChunks, numberOfYChunks * @note The result are stored in the fields numberOfChunks, numberOfXChunks, numberOfYChunks
*/ */
void determineNumberOfChunks(); void determineNumberOfChunks();
/** /**
* @brief try to schedule a specific chunk. * @brief try to schedule a specific chunk.
* @note scheduling succeeds when all input requirements are met and the chunks hasen't been scheduled yet. * @note scheduling succeeds when all input requirements are met and the chunks hasen't been scheduled yet.
* @param graph * @param graph
* @param xChunk * @param xChunk
* @param yChunk * @param yChunk
* @return [true:false] * @return [true:false]
* true: package(s) are scheduled * true: package(s) are scheduled
* false: scheduling is deferred (depending workpackages are scheduled) * false: scheduling is deferred (depending workpackages are scheduled)
*/ */
bool scheduleChunkWhenPossible(ExecutionSystem * graph, int xChunk, int yChunk); bool scheduleChunkWhenPossible(ExecutionSystem *graph, int xChunk, int yChunk);
/** /**
* @brief try to schedule a specific area. * @brief try to schedule a specific area.
* @note Check if a certain area is available, when not available this are will be checked. * @note Check if a certain area is available, when not available this are will be checked.
* @note This method is called from other ExecutionGroup's. * @note This method is called from other ExecutionGroup's.
* @param graph * @param graph
* @param rect * @param rect
* @return [true:false] * @return [true:false]
* true: package(s) are scheduled * true: package(s) are scheduled
* false: scheduling is deferred (depending workpackages are scheduled) * false: scheduling is deferred (depending workpackages are scheduled)
*/ */
bool scheduleAreaWhenPossible(ExecutionSystem * graph, rcti * rect); bool scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *rect);
/** /**
* @brief add a chunk to the WorkScheduler. * @brief add a chunk to the WorkScheduler.
* @param chunknumber * @param chunknumber
*/ */
bool scheduleChunk(unsigned int chunkNumber); bool scheduleChunk(unsigned int chunkNumber);
/** /**
* @brief determine the area of interest of a certain input area * @brief determine the area of interest of a certain input area
* @note This method only evaluates a single ReadBufferOperation * @note This method only evaluates a single ReadBufferOperation
* @param input the input area * @param input the input area
* @param readOperation The ReadBufferOperation where the area needs to be evaluated * @param readOperation The ReadBufferOperation where the area needs to be evaluated
* @param output the area needed of the ReadBufferOperation. Result * @param output the area needed of the ReadBufferOperation. Result
*/ */
void determineDependingAreaOfInterest(rcti * input, ReadBufferOperation *readOperation, rcti *output); void determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
public: public:
@ -237,162 +237,162 @@ public:
// methods // methods
/** /**
* @brief check to see if a NodeOperation is already inside this execution group * @brief check to see if a NodeOperation is already inside this execution group
* @param operation the NodeOperation to check * @param operation the NodeOperation to check
* @return [true,false] * @return [true,false]
*/ */
bool containsOperation(NodeOperation *operation); bool containsOperation(NodeOperation *operation);
/** /**
* @brief add an operation to this ExecutionGroup * @brief add an operation to this ExecutionGroup
* @note this method will add input of the operations recursivly * @note this method will add input of the operations recursivly
* @note this method can create multiple ExecutionGroup's * @note this method can create multiple ExecutionGroup's
* @param system * @param system
* @param operation * @param operation
*/ */
void addOperation(ExecutionSystem *system, NodeOperation *operation); void addOperation(ExecutionSystem *system, NodeOperation *operation);
/** /**
* @brief is this ExecutionGroup an output ExecutionGroup * @brief is this ExecutionGroup an output ExecutionGroup
* @note An OutputExecution group are groups containing a * @note An OutputExecution group are groups containing a
* @note ViewerOperation, CompositeOperation, PreviewOperation. * @note ViewerOperation, CompositeOperation, PreviewOperation.
* @see NodeOperation.isOutputOperation * @see NodeOperation.isOutputOperation
*/ */
const int isOutputExecutionGroup() const {return this->isOutput;} const int isOutputExecutionGroup() const { return this->isOutput; }
/** /**
* @brief set whether this ExecutionGroup is an output * @brief set whether this ExecutionGroup is an output
* @param isOutput * @param isOutput
*/ */
void setOutputExecutionGroup(int isOutput) {this->isOutput = isOutput;} void setOutputExecutionGroup(int isOutput) { this->isOutput = isOutput; }
/** /**
* @brief determine the resolution of this ExecutionGroup * @brief determine the resolution of this ExecutionGroup
* @param resolution * @param resolution
*/ */
void determineResolution(unsigned int resolution[]); void determineResolution(unsigned int resolution[]);
/** /**
* @brief set the resolution of this executiongroup * @brief set the resolution of this executiongroup
* @param resolution * @param resolution
*/ */
void setResolution(unsigned int resolution[]) {this->width = resolution[0];this->height = resolution[1];} void setResolution(unsigned int resolution[]) { this->width = resolution[0]; this->height = resolution[1]; }
/** /**
* @brief get the width of this execution group * @brief get the width of this execution group
*/ */
const unsigned int getWidth() {return this->width;} const unsigned int getWidth() { return this->width; }
/** /**
* @brief get the height of this execution group * @brief get the height of this execution group
*/ */
const unsigned int getHeight() {return this->height;} const unsigned int getHeight() { return this->height; }
/** /**
* @brief does this ExecutionGroup contains a complex NodeOperation * @brief does this ExecutionGroup contains a complex NodeOperation
*/ */
const bool isComplex() const; const bool isComplex() const;
/** /**
* @brief get the output operation of this ExecutionGroup * @brief get the output operation of this ExecutionGroup
* @return NodeOperation *output operation * @return NodeOperation *output operation
*/ */
NodeOperation *getOutputNodeOperation() const; NodeOperation *getOutputNodeOperation() const;
/** /**
* @brief compose multiple chunks into a single chunk * @brief compose multiple chunks into a single chunk
* @return Memorybuffer *consolidated chunk * @return Memorybuffer *consolidated chunk
*/ */
MemoryBuffer *constructConsolidatedMemoryBuffer(MemoryProxy *memoryProxy, rcti *output); MemoryBuffer *constructConsolidatedMemoryBuffer(MemoryProxy *memoryProxy, rcti *output);
/** /**
* @brief initExecution is called just before the execution of the whole graph will be done. * @brief initExecution is called just before the execution of the whole graph will be done.
* @note The implementation will calculate the chunkSize of this execution group. * @note The implementation will calculate the chunkSize of this execution group.
*/ */
void initExecution(); void initExecution();
/** /**
* @brief get all inputbuffers needed to calculate an chunk * @brief get all inputbuffers needed to calculate an chunk
* @note all inputbuffers must be executed * @note all inputbuffers must be executed
* @param chunkNumber the chunk to be calculated * @param chunkNumber the chunk to be calculated
* @return MemoryBuffer** the inputbuffers * @return MemoryBuffer** the inputbuffers
*/ */
MemoryBuffer** getInputBuffersCPU(); MemoryBuffer **getInputBuffersCPU();
/** /**
* @brief get all inputbuffers needed to calculate an chunk * @brief get all inputbuffers needed to calculate an chunk
* @note all inputbuffers must be executed * @note all inputbuffers must be executed
* @param chunkNumber the chunk to be calculated * @param chunkNumber the chunk to be calculated
* @return MemoryBuffer** the inputbuffers * @return MemoryBuffer** the inputbuffers
*/ */
MemoryBuffer** getInputBuffersOpenCL(int chunkNumber); MemoryBuffer **getInputBuffersOpenCL(int chunkNumber);
/** /**
* @brief allocate the outputbuffer of a chunk * @brief allocate the outputbuffer of a chunk
* @param chunkNumber the number of the chunk in the ExecutionGroup * @param chunkNumber the number of the chunk in the ExecutionGroup
* @param rect the rect of that chunk * @param rect the rect of that chunk
* @see determineChunkRect * @see determineChunkRect
*/ */
MemoryBuffer *allocateOutputBuffer(int chunkNumber, rcti *rect); MemoryBuffer *allocateOutputBuffer(int chunkNumber, rcti *rect);
/** /**
* @brief after a chunk is executed the needed resources can be freed or unlocked. * @brief after a chunk is executed the needed resources can be freed or unlocked.
* @param chunknumber * @param chunknumber
* @param memorybuffers * @param memorybuffers
*/ */
void finalizeChunkExecution(int chunkNumber, MemoryBuffer** memoryBuffers); void finalizeChunkExecution(int chunkNumber, MemoryBuffer **memoryBuffers);
/** /**
* @brief deinitExecution is called just after execution the whole graph. * @brief deinitExecution is called just after execution the whole graph.
* @note It will release all needed resources * @note It will release all needed resources
*/ */
void deinitExecution(); void deinitExecution();
/** /**
* @brief schedule an ExecutionGroup * @brief schedule an ExecutionGroup
* @note this method will return when all chunks have been calculated, or the execution has breaked (by user) * @note this method will return when all chunks have been calculated, or the execution has breaked (by user)
* *
* first the order of the chunks will be determined. This is determined by finding the ViewerOperation and get the relevant information from it. * first the order of the chunks will be determined. This is determined by finding the ViewerOperation and get the relevant information from it.
* - ChunkOrdering * - ChunkOrdering
* - CenterX * - CenterX
* - CenterY * - CenterY
* *
* After determining the order of the chunks the chunks will be scheduled * After determining the order of the chunks the chunks will be scheduled
* *
* @see ViewerOperation * @see ViewerOperation
* @param system * @param system
*/ */
void execute(ExecutionSystem *system); void execute(ExecutionSystem *system);
/** /**
* @brief this method determines the MemoryProxy's where this execution group depends on. * @brief this method determines the MemoryProxy's where this execution group depends on.
* @note After this method determineDependingAreaOfInterest can be called to determine * @note After this method determineDependingAreaOfInterest can be called to determine
* @note the area of the MemoryProxy.creator thas has to be executed. * @note the area of the MemoryProxy.creator thas has to be executed.
* @param memoryProxies result * @param memoryProxies result
*/ */
void determineDependingMemoryProxies(vector<MemoryProxy*> *memoryProxies); void determineDependingMemoryProxies(vector<MemoryProxy *> *memoryProxies);
/** /**
* @brief Determine the rect (minx, maxx, miny, maxy) of a chunk. * @brief Determine the rect (minx, maxx, miny, maxy) of a chunk.
* @note Only gives usefull results ater the determination of the chunksize * @note Only gives usefull results ater the determination of the chunksize
* @see determineChunkSize() * @see determineChunkSize()
*/ */
void determineChunkRect(rcti *rect, const unsigned int chunkNumber) const; void determineChunkRect(rcti *rect, const unsigned int chunkNumber) const;
/** /**
* @brief can this ExecutionGroup be scheduled on an OpenCLDevice * @brief can this ExecutionGroup be scheduled on an OpenCLDevice
* @see WorkScheduler.schedule * @see WorkScheduler.schedule
*/ */
bool isOpenCL(); bool isOpenCL();
void setChunksize(int chunksize) {this->chunkSize = chunksize;} void setChunksize(int chunksize) { this->chunkSize = chunksize; }
/** /**
* @brief get the Render priority of this ExecutionGroup * @brief get the Render priority of this ExecutionGroup
* @see ExecutionSystem.execute * @see ExecutionSystem.execute
*/ */
CompositorPriority getRenderPriotrity(); CompositorPriority getRenderPriotrity();
}; };

View File

@ -36,69 +36,69 @@ class ExecutionGroup;
using namespace std; using namespace std;
/** /**
* @page execution Execution model * @page execution Execution model
* In order to get to an efficient model for execution, serveral steps are being done. these steps are explained below. * In order to get to an efficient model for execution, serveral steps are being done. these steps are explained below.
* *
* @section EM_Step1 Step 1: translating blender node system to the new compsitor system * @section EM_Step1 Step 1: translating blender node system to the new compsitor system
* Blenders node structure is based on C structs (DNA). These structs are not efficient in the new architecture. We want to use classes in order to simplify the system. * Blenders node structure is based on C structs (DNA). These structs are not efficient in the new architecture. We want to use classes in order to simplify the system.
* during this step the blender node_tree is evaluated and converted to a CPP node system. * during this step the blender node_tree is evaluated and converted to a CPP node system.
* *
* @see ExecutionSystem * @see ExecutionSystem
* @see Converter.convert * @see Converter.convert
* @see Node * @see Node
* *
* @section EM_Step2 Step2: translating nodes to operations * @section EM_Step2 Step2: translating nodes to operations
* Ungrouping the GroupNodes. Group nodes are node_tree's in node_tree's. The new system only supports a single level of node_tree. We will 'flatten' the system in a single level. * Ungrouping the GroupNodes. Group nodes are node_tree's in node_tree's. The new system only supports a single level of node_tree. We will 'flatten' the system in a single level.
* @see GroupNode * @see GroupNode
* @see ExecutionSystemHelper.ungroup * @see ExecutionSystemHelper.ungroup
* *
* Every node has the ability to convert itself to operations. The node itself is responsible to create a correct NodeOperation setup based on its internal settings. * Every node has the ability to convert itself to operations. The node itself is responsible to create a correct NodeOperation setup based on its internal settings.
* Most Node only need to convert it to its NodeOperation. Like a ColorToBWNode doesn't check anything, but replaces itself with a ConvertColorToBWOperation. * Most Node only need to convert it to its NodeOperation. Like a ColorToBWNode doesn't check anything, but replaces itself with a ConvertColorToBWOperation.
* More complex nodes can use different NodeOperation based on settings; like MixNode. based on the selected Mixtype a different operation will be used. * More complex nodes can use different NodeOperation based on settings; like MixNode. based on the selected Mixtype a different operation will be used.
* for more information see the page about creating new Nodes. [@subpage newnode] * for more information see the page about creating new Nodes. [@subpage newnode]
* *
* @see ExecutionSystem.convertToOperations * @see ExecutionSystem.convertToOperations
* @see Node.convertToOperations * @see Node.convertToOperations
* @see NodeOperation base class for all operations in the system * @see NodeOperation base class for all operations in the system
* *
* @section EM_Step3 Step3: add additional conversions to the operation system * @section EM_Step3 Step3: add additional conversions to the operation system
* - Data type conversions: the system has 3 data types COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR. The user can connect a Value socket to a color socket. As values are ordered differently than colors a conversion happens. * - Data type conversions: the system has 3 data types COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR. The user can connect a Value socket to a color socket. As values are ordered differently than colors a conversion happens.
* *
* - Image size conversions: the system can automatically convert when resolutions do not match. An InputSocket has a resize mode. This can be any of the folowing settings. * - Image size conversions: the system can automatically convert when resolutions do not match. An InputSocket has a resize mode. This can be any of the folowing settings.
* - [@ref InputSocketResizeMode.COM_SC_CENTER]: The center of both images are aligned * - [@ref InputSocketResizeMode.COM_SC_CENTER]: The center of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_FIT_WIDTH]: The width of both images are aligned * - [@ref InputSocketResizeMode.COM_SC_FIT_WIDTH]: The width of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_FIT_HEIGHT]: the height of both images are aligned * - [@ref InputSocketResizeMode.COM_SC_FIT_HEIGHT]: the height of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_FIT]: The width, or the height of both images are aligned to make sure that it fits. * - [@ref InputSocketResizeMode.COM_SC_FIT]: The width, or the height of both images are aligned to make sure that it fits.
* - [@ref InputSocketResizeMode.COM_SC_STRETCH]: The width and the height of both images are aligned * - [@ref InputSocketResizeMode.COM_SC_STRETCH]: The width and the height of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_NO_RESIZE]: bottom left of the images are aligned. * - [@ref InputSocketResizeMode.COM_SC_NO_RESIZE]: bottom left of the images are aligned.
* *
* @see Converter.convertDataType Datatype conversions * @see Converter.convertDataType Datatype conversions
* @see Converter.convertResolution Image size conversions * @see Converter.convertResolution Image size conversions
* *
* @section EM_Step4 Step4: group operations in executions groups * @section EM_Step4 Step4: group operations in executions groups
* ExecutionGroup are groups of operations that are calculated as being one bigger operation. All operations will be part of an ExecutionGroup. * ExecutionGroup are groups of operations that are calculated as being one bigger operation. All operations will be part of an ExecutionGroup.
* Complex nodes will be added to separate groups. Between ExecutionGroup's the data will be stored in MemoryBuffers. ReadBufferOperations and WriteBufferOperations are added where needed. * Complex nodes will be added to separate groups. Between ExecutionGroup's the data will be stored in MemoryBuffers. ReadBufferOperations and WriteBufferOperations are added where needed.
* *
* <pre> * <pre>
* *
* +------------------------------+ +----------------+ * +------------------------------+ +----------------+
* | ExecutionGroup A | |ExecutionGroup B| ExecutionGroup * | ExecutionGroup A | |ExecutionGroup B| ExecutionGroup
* | +----------+ +----------+| |+----------+ | * | +----------+ +----------+| |+----------+ |
* /----->| Operation|---->| Operation|-\ /--->| Operation|-\ | NodeOperation * /----->| Operation|---->| Operation|-\ /--->| Operation|-\ | NodeOperation
* | | | A | | B ||| | || C | | | * | | | A | | B ||| | || C | | |
* | | | cFFA | /->| cFFA ||| | || cFFA | | | * | | | cFFA | /->| cFFA ||| | || cFFA | | |
* | | +----------+ | +----------+|| | |+----------+ | | * | | +----------+ | +----------+|| | |+----------+ | |
* | +---------------|--------------+v | +-------------v--+ * | +---------------|--------------+v | +-------------v--+
* +-*----+ +---*--+ +--*-*--+ +--*----+ * +-*----+ +---*--+ +--*-*--+ +--*----+
* |inputA| |inputB| |outputA| |outputB| MemoryBuffer * |inputA| |inputB| |outputA| |outputB| MemoryBuffer
* |cFAA | |cFAA | |cFAA | |cFAA | * |cFAA | |cFAA | |cFAA | |cFAA |
* +------+ +------+ +-------+ +-------+ * +------+ +------+ +-------+ +-------+
* </pre> * </pre>
* @see ExecutionSystem.groupOperations method doing this step * @see ExecutionSystem.groupOperations method doing this step
* @see ExecutionSystem.addReadWriteBufferOperations * @see ExecutionSystem.addReadWriteBufferOperations
* @see NodeOperation.isComplex * @see NodeOperation.isComplex
* @see ExecutionGroup class representing the ExecutionGroup * @see ExecutionGroup class representing the ExecutionGroup
*/ */
/** /**
* @brief the ExecutionSystem contains the whole compositor tree. * @brief the ExecutionSystem contains the whole compositor tree.
@ -106,129 +106,129 @@ using namespace std;
class ExecutionSystem { class ExecutionSystem {
private: private:
/** /**
* @brief the context used during execution * @brief the context used during execution
*/ */
CompositorContext context; CompositorContext context;
/** /**
* @brief vector of nodes * @brief vector of nodes
*/ */
vector<Node*> nodes; vector<Node *> nodes;
/** /**
* @brief vector of operations * @brief vector of operations
*/ */
vector<NodeOperation*> operations; vector<NodeOperation *> operations;
/** /**
* @brief vector of groups * @brief vector of groups
*/ */
vector<ExecutionGroup*> groups vector<ExecutionGroup *> groups
/** /**
* @brief vector of connections * @brief vector of connections
*/; */;
vector<SocketConnection*> connections; vector<SocketConnection *> connections;
private: //methods private: //methods
/** /**
* @brief add ReadBufferOperation and WriteBufferOperation around an operation * @brief add ReadBufferOperation and WriteBufferOperation around an operation
* @param operation the operation to add the bufferoperations around. * @param operation the operation to add the bufferoperations around.
*/ */
void addReadWriteBufferOperations(NodeOperation *operation); void addReadWriteBufferOperations(NodeOperation *operation);
/** /**
* find all execution group with output nodes * find all execution group with output nodes
*/ */
void findOutputExecutionGroup(vector<ExecutionGroup*> *result, CompositorPriority priority) const; void findOutputExecutionGroup(vector<ExecutionGroup *> *result, CompositorPriority priority) const;
/** /**
* find all execution group with output nodes * find all execution group with output nodes
*/ */
void findOutputExecutionGroup(vector<ExecutionGroup*> *result) const; void findOutputExecutionGroup(vector<ExecutionGroup *> *result) const;
public: public:
/** /**
* @brief Create a new ExecutionSystem and initialize it with the * @brief Create a new ExecutionSystem and initialize it with the
* editingtree. * editingtree.
* *
* @param editingtree [bNodeTree*] * @param editingtree [bNodeTree*]
* @param rendering [true false] * @param rendering [true false]
*/ */
ExecutionSystem(bNodeTree *editingtree, bool rendering); ExecutionSystem(bNodeTree *editingtree, bool rendering);
/** /**
* Destructor * Destructor
*/ */
~ExecutionSystem(); ~ExecutionSystem();
/** /**
* @brief execute this system * @brief execute this system
* - initialize the NodeOperation's and ExecutionGroup's * - initialize the NodeOperation's and ExecutionGroup's
* - schedule the output ExecutionGroup's based on their priority * - schedule the output ExecutionGroup's based on their priority
* - deinitialize the ExecutionGroup's and NodeOperation's * - deinitialize the ExecutionGroup's and NodeOperation's
*/ */
void execute(); void execute();
/** /**
* @brief Add an operation to the operation list * @brief Add an operation to the operation list
* *
* @param operation the operation to add * @param operation the operation to add
*/ */
void addOperation(NodeOperation *operation); void addOperation(NodeOperation *operation);
/** /**
* Add an editor link to the system. convert it to an socketconnection (CPP-representative) * Add an editor link to the system. convert it to an socketconnection (CPP-representative)
* this converted socket is returned. * this converted socket is returned.
*/ */
SocketConnection *addNodeLink(bNodeLink *bNodeLink); SocketConnection *addNodeLink(bNodeLink *bNodeLink);
void addSocketConnection(SocketConnection *connection); void addSocketConnection(SocketConnection *connection);
/** /**
* @brief Convert all nodes to operations * @brief Convert all nodes to operations
*/ */
void convertToOperations(); void convertToOperations();
/** /**
* @brief group operations in ExecutionGroup's * @brief group operations in ExecutionGroup's
* @see ExecutionGroup * @see ExecutionGroup
*/ */
void groupOperations(); void groupOperations();
/** /**
* @brief get the reference to the compositor context * @brief get the reference to the compositor context
*/ */
CompositorContext& getContext() {return this->context;} CompositorContext& getContext() { return this->context; }
/** /**
* @brief get the reference to the compositor nodes * @brief get the reference to the compositor nodes
*/ */
vector<Node*>& getNodes() {return this->nodes;} vector<Node *>& getNodes() { return this->nodes; }
/** /**
* @brief get the reference to the compositor connections * @brief get the reference to the compositor connections
*/ */
vector<SocketConnection*>& getConnections() {return this->connections;} vector<SocketConnection *>& getConnections() { return this->connections; }
/** /**
* @brief get the reference to the list of execution groups * @brief get the reference to the list of execution groups
*/ */
vector<ExecutionGroup*>& getExecutionGroups() {return this->groups;} vector<ExecutionGroup *>& getExecutionGroups() { return this->groups; }
/** /**
* @brief get the reference to the list of operations * @brief get the reference to the list of operations
*/ */
vector<NodeOperation*>& getOperations() {return this->operations;} vector<NodeOperation *>& getOperations() { return this->operations; }
private: private:
/** /**
* @brief determine the actual data types of all sockets * @brief determine the actual data types of all sockets
* @param nodes list of nodes or operations to do the data type determination * @param nodes list of nodes or operations to do the data type determination
*/ */
void determineActualSocketDataTypes(vector<NodeBase*> &nodes); void determineActualSocketDataTypes(vector<NodeBase *> &nodes);
void executeGroups(CompositorPriority priority); void executeGroups(CompositorPriority priority);

View File

@ -42,86 +42,86 @@ class ExecutionSystemHelper {
public: public:
/** /**
* @brief add an bNodeTree to the nodes list and connections * @brief add an bNodeTree to the nodes list and connections
* @param system Execution system * @param system Execution system
* @param nodes_start Starting index in the system's nodes list for nodes in this tree. * @param nodes_start Starting index in the system's nodes list for nodes in this tree.
* @param tree bNodeTree to add * @param tree bNodeTree to add
* @return Node representing the "Compositor node" of the maintree. or NULL when a subtree is added * @return Node representing the "Compositor node" of the maintree. or NULL when a subtree is added
*/ */
static Node *addbNodeTree(ExecutionSystem &system, int nodes_start, bNodeTree* tree, bNode *groupnode); static Node *addbNodeTree(ExecutionSystem &system, int nodes_start, bNodeTree *tree, bNode *groupnode);
/** /**
* @brief add an editor node to the system. * @brief add an editor node to the system.
* this node is converted to a Node instance. * this node is converted to a Node instance.
* and the converted node is returned * and the converted node is returned
* *
* @param bNode node to add * @param bNode node to add
* @return Node that represents the bNode or null when not able to convert. * @return Node that represents the bNode or null when not able to convert.
*/ */
static Node *addNode(vector<Node*>& nodes, bNode *bNode, bool isInActiveGroup); static Node *addNode(vector<Node *>& nodes, bNode *bNode, bool isInActiveGroup);
/** /**
* @brief Add a Node to a list * @brief Add a Node to a list
* *
* @param nodes the list where the node needs to be added to * @param nodes the list where the node needs to be added to
* @param node the node to be added * @param node the node to be added
*/ */
static void addNode(vector<Node*>& nodes, Node *node); static void addNode(vector<Node *>& nodes, Node *node);
/** /**
* @brief Add an operation to the operation list * @brief Add an operation to the operation list
* *
* The id of the operation is updated. * The id of the operation is updated.
* *
* @param operations the list where the operation need to be added to * @param operations the list where the operation need to be added to
* @param operation the operation to add * @param operation the operation to add
*/ */
static void addOperation(vector<NodeOperation*> &operations, NodeOperation *operation); static void addOperation(vector<NodeOperation *> &operations, NodeOperation *operation);
/** /**
* @brief Add an ExecutionGroup to a list * @brief Add an ExecutionGroup to a list
* *
* The id of the ExecutionGroup is updated. * The id of the ExecutionGroup is updated.
* *
* @param executionGroups the list where the executionGroup need to be added to * @param executionGroups the list where the executionGroup need to be added to
* @param executionGroup the ExecutionGroup to add * @param executionGroup the ExecutionGroup to add
*/ */
static void addExecutionGroup(vector<ExecutionGroup*>& executionGroups, ExecutionGroup *executionGroup); static void addExecutionGroup(vector<ExecutionGroup *>& executionGroups, ExecutionGroup *executionGroup);
/** /**
* Find all Node Operations that needs to be executed. * Find all Node Operations that needs to be executed.
* @param rendering * @param rendering
* the rendering parameter will tell what type of execution we are doing * the rendering parameter will tell what type of execution we are doing
* FALSE is editing, TRUE is rendering * FALSE is editing, TRUE is rendering
*/ */
static void findOutputNodeOperations(vector<NodeOperation*>* result, vector<NodeOperation*>& operations , bool rendering); static void findOutputNodeOperations(vector<NodeOperation *> *result, vector<NodeOperation *>& operations, bool rendering);
/** /**
* @brief add a bNodeLink to the list of links * @brief add a bNodeLink to the list of links
* the bNodeLink will be wrapped in a SocketConnection * the bNodeLink will be wrapped in a SocketConnection
* *
* @note Cyclic links will be ignored * @note Cyclic links will be ignored
* *
* @param node_range list of possible nodes for lookup. * @param node_range list of possible nodes for lookup.
* @param links list of links to add the bNodeLink to * @param links list of links to add the bNodeLink to
* @param bNodeLink the link to be added * @param bNodeLink the link to be added
* @return the created SocketConnection or NULL * @return the created SocketConnection or NULL
*/ */
static SocketConnection *addNodeLink(NodeRange &node_range, vector<SocketConnection*>& links, bNodeLink *bNodeLink); static SocketConnection *addNodeLink(NodeRange &node_range, vector<SocketConnection *>& links, bNodeLink *bNodeLink);
/** /**
* @brief create a new SocketConnection and add to a vector of links * @brief create a new SocketConnection and add to a vector of links
* @param links the vector of links * @param links the vector of links
* @param fromSocket the startpoint of the connection * @param fromSocket the startpoint of the connection
* @param toSocket the endpoint of the connection * @param toSocket the endpoint of the connection
* @return the new created SocketConnection * @return the new created SocketConnection
*/ */
static SocketConnection *addLink(vector<SocketConnection*>& links, OutputSocket *fromSocket, InputSocket *toSocket); static SocketConnection *addLink(vector<SocketConnection *>& links, OutputSocket *fromSocket, InputSocket *toSocket);
/** /**
* @brief dumps the content of the execution system to standard out * @brief dumps the content of the execution system to standard out
* @param system the execution system to dump * @param system the execution system to dump
*/ */
static void debugDump(ExecutionSystem *system); static void debugDump(ExecutionSystem *system);
}; };
#endif #endif

View File

@ -36,10 +36,10 @@ class ChannelInfo;
class NodeOperation; class NodeOperation;
/** /**
* @brief Resize modes of inputsockets * @brief Resize modes of inputsockets
* How are the input and working resolutions matched * How are the input and working resolutions matched
* @ingroup Model * @ingroup Model
*/ */
typedef enum InputSocketResizeMode { typedef enum InputSocketResizeMode {
/** @brief Center the input image to the center of the working area of the node, no resizing occurs */ /** @brief Center the input image to the center of the working area of the node, no resizing occurs */
COM_SC_CENTER = NS_CR_CENTER, COM_SC_CENTER = NS_CR_CENTER,
@ -56,34 +56,34 @@ typedef enum InputSocketResizeMode {
} InputSocketResizeMode; } InputSocketResizeMode;
/** /**
* @brief InputSocket are sockets that can receive data/input * @brief InputSocket are sockets that can receive data/input
* @ingroup Model * @ingroup Model
*/ */
class InputSocket : public Socket { class InputSocket : public Socket {
private: private:
/** /**
* @brief connection connected to this InputSocket. * @brief connection connected to this InputSocket.
* An input socket can only have a single connection * An input socket can only have a single connection
*/ */
SocketConnection *connection; SocketConnection *connection;
/** /**
* @brief resize mode of this socket * @brief resize mode of this socket
*/ */
InputSocketResizeMode resizeMode; InputSocketResizeMode resizeMode;
/** /**
* @brief convert a data type to a by the socket supported data type. * @brief convert a data type to a by the socket supported data type.
* *
* @param datatype the datatype that needs to be checked * @param datatype the datatype that needs to be checked
* @section data-conversion * @section data-conversion
*/ */
DataType convertToSupportedDataType(DataType datatype); DataType convertToSupportedDataType(DataType datatype);
/** /**
* @brief called when the ActualDataType is set. notifies other parties * @brief called when the ActualDataType is set. notifies other parties
*/ */
void fireActualDataTypeSet(); void fireActualDataTypeSet();
public: public:
@ -98,55 +98,59 @@ public:
int isInputSocket() const; int isInputSocket() const;
/** /**
* @brief determine the resolution of this data going through this socket * @brief determine the resolution of this data going through this socket
* @param resolution the result of this operation * @param resolution the result of this operation
* @param preferredResolution the preferrable resolution as no resolution could be determined * @param preferredResolution the preferrable resolution as no resolution could be determined
*/ */
void determineResolution(unsigned int resolution[],unsigned int preferredResolution[]); void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
void determineActualDataType(); void determineActualDataType();
/** /**
* @brief Notifies the Input of the data type (via a SocketConnection) * @brief Notifies the Input of the data type (via a SocketConnection)
* @param datatype the datatype to evaluate * @param datatype the datatype to evaluate
*/ */
void notifyActualInputType(DataType datatype); void notifyActualInputType(DataType datatype);
/** /**
* @brief move all connections of this input socket to another socket * @brief move all connections of this input socket to another socket
* only use this method when already checked the availability of a SocketConnection * only use this method when already checked the availability of a SocketConnection
* @param relinkToSocket the socket to move to connections to * @param relinkToSocket the socket to move to connections to
*/ */
void relinkConnections(InputSocket *relinkToSocket); void relinkConnections(InputSocket *relinkToSocket);
/** /**
* @brief move all connections of this input socket to another socket * @brief move all connections of this input socket to another socket
* @param relinkToSocket the socket to move to connections to * @param relinkToSocket the socket to move to connections to
* @param autoconnect will a set operation be added when no connections exist * @param autoconnect will a set operation be added when no connections exist
* @param editorNodeInputSocketIndex index of the socket number of the bNode (used to retrieve the value for autoconnection) * @param editorNodeInputSocketIndex index of the socket number of the bNode (used to retrieve the value for autoconnection)
* @param system ExecutionSystem to update to * @param system ExecutionSystem to update to
*/ */
void relinkConnections(InputSocket *relinkToSocket, int editorNodeInputSocketIndex, ExecutionSystem *system); void relinkConnections(InputSocket *relinkToSocket, int editorNodeInputSocketIndex, ExecutionSystem *system);
/** /**
* @brief move all connections of this input socket to another socket * @brief move all connections of this input socket to another socket
* @param relinkToSocket the socket to move to connections to * @param relinkToSocket the socket to move to connections to
* @param editorNodeInputSocketIndex index of the socket number of the bNode (used to retrieve the value for autoconnection) * @param editorNodeInputSocketIndex index of the socket number of the bNode (used to retrieve the value for autoconnection)
* @param system ExecutionSystem to update to * @param system ExecutionSystem to update to
*/ */
void relinkConnectionsDuplicate(InputSocket *relinkToSocket, int editorNodeInputSocketIndex, ExecutionSystem *system); void relinkConnectionsDuplicate(InputSocket *relinkToSocket, int editorNodeInputSocketIndex, ExecutionSystem *system);
/** /**
* @brief set the resize mode * @brief set the resize mode
* @param resizeMode the new resize mode. * @param resizeMode the new resize mode.
*/ */
void setResizeMode(InputSocketResizeMode resizeMode) {this->resizeMode = resizeMode;} void setResizeMode(InputSocketResizeMode resizeMode) {
this->resizeMode = resizeMode;
}
/** /**
* @brief get the resize mode of this socket * @brief get the resize mode of this socket
* @return InputSocketResizeMode * @return InputSocketResizeMode
*/ */
InputSocketResizeMode getResizeMode() const {return this->resizeMode;} InputSocketResizeMode getResizeMode() const {
return this->resizeMode;
}
const ChannelInfo *getChannelInfo(const int channelnumber); const ChannelInfo *getChannelInfo(const int channelnumber);

View File

@ -34,9 +34,9 @@ extern "C" {
#include <vector> #include <vector>
/** /**
* @brief state of a memory buffer * @brief state of a memory buffer
* @ingroup Memory * @ingroup Memory
*/ */
typedef enum MemoryBufferState { typedef enum MemoryBufferState {
/** @brief memory has been allocated on creator device and CPU machine, but kernel has not been executed */ /** @brief memory has been allocated on creator device and CPU machine, but kernel has not been executed */
COM_MB_ALLOCATED = 1, COM_MB_ALLOCATED = 1,
@ -49,77 +49,77 @@ typedef enum MemoryBufferState {
class MemoryProxy; class MemoryProxy;
/** /**
* @brief a MemoryBuffer contains access to the data of a chunk * @brief a MemoryBuffer contains access to the data of a chunk
*/ */
class MemoryBuffer { class MemoryBuffer {
private: private:
/** /**
* @brief proxy of the memory (same for all chunks in the same buffer) * @brief proxy of the memory (same for all chunks in the same buffer)
*/ */
MemoryProxy * memoryProxy; MemoryProxy *memoryProxy;
/** /**
* @brief the type of buffer COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR * @brief the type of buffer COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR
*/ */
DataType datatype; DataType datatype;
/** /**
* @brief region of this buffer inside reative to the MemoryProxy * @brief region of this buffer inside reative to the MemoryProxy
*/ */
rcti rect; rcti rect;
/** /**
* brief refers to the chunknumber within the executiongroup where related to the MemoryProxy * brief refers to the chunknumber within the executiongroup where related to the MemoryProxy
* @see memoryProxy * @see memoryProxy
*/ */
unsigned int chunkNumber; unsigned int chunkNumber;
/** /**
* @brief width of the chunk * @brief width of the chunk
*/ */
unsigned int chunkWidth; unsigned int chunkWidth;
/** /**
* @brief state of the buffer * @brief state of the buffer
*/ */
MemoryBufferState state; MemoryBufferState state;
/** /**
* @brief the actual float buffer/data * @brief the actual float buffer/data
*/ */
float *buffer; float *buffer;
public: public:
/** /**
* @brief construct new MemoryBuffer for a chunk * @brief construct new MemoryBuffer for a chunk
*/ */
MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, rcti *rect); MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, rcti *rect);
/** /**
* @brief construct new temporarily MemoryBuffer for an area * @brief construct new temporarily MemoryBuffer for an area
*/ */
MemoryBuffer(MemoryProxy *memoryProxy, rcti *rect); MemoryBuffer(MemoryProxy *memoryProxy, rcti *rect);
/** /**
* @brief destructor * @brief destructor
*/ */
~MemoryBuffer(); ~MemoryBuffer();
/** /**
* @brief read the ChunkNumber of this MemoryBuffer * @brief read the ChunkNumber of this MemoryBuffer
*/ */
unsigned int getChunkNumber() {return this->chunkNumber;} unsigned int getChunkNumber() { return this->chunkNumber; }
/** /**
* @brief get the data of this MemoryBuffer * @brief get the data of this MemoryBuffer
* @note buffer should already be available in memory * @note buffer should already be available in memory
*/ */
float *getBuffer() {return this->buffer;} float *getBuffer() { return this->buffer; }
/** /**
* @brief after execution the state will be set to available by calling this method * @brief after execution the state will be set to available by calling this method
*/ */
void setCreatedState() { void setCreatedState() {
this->state = COM_MB_AVAILABLE; this->state = COM_MB_AVAILABLE;
} }
@ -130,34 +130,34 @@ public:
void readEWA(float result[4], float fx, float fy, float dx, float dy); void readEWA(float result[4], float fx, float fy, float dx, float dy);
/** /**
* @brief is this MemoryBuffer a temporarily buffer (based on an area, not on a chunk) * @brief is this MemoryBuffer a temporarily buffer (based on an area, not on a chunk)
*/ */
inline const bool isTemporarily() const {return this->state == COM_MB_TEMPORARILY;} inline const bool isTemporarily() const { return this->state == COM_MB_TEMPORARILY; }
/** /**
* @brief add the content from otherBuffer to this MemoryBuffer * @brief add the content from otherBuffer to this MemoryBuffer
* @param otherBuffer source buffer * @param otherBuffer source buffer
*/ */
void copyContentFrom(MemoryBuffer *otherBuffer); void copyContentFrom(MemoryBuffer *otherBuffer);
/** /**
* @brief get the rect of this MemoryBuffer * @brief get the rect of this MemoryBuffer
*/ */
rcti *getRect() {return &this->rect;} rcti *getRect() { return &this->rect; }
/** /**
* @brief get the width of this MemoryBuffer * @brief get the width of this MemoryBuffer
*/ */
int getWidth() const; int getWidth() const;
/** /**
* @brief get the height of this MemoryBuffer * @brief get the height of this MemoryBuffer
*/ */
int getHeight() const; int getHeight() const;
/** /**
* @brief clear the buffer. Make all pixels black transparant. * @brief clear the buffer. Make all pixels black transparant.
*/ */
void clear(); void clear();
MemoryBuffer *duplicate(); MemoryBuffer *duplicate();

View File

@ -30,78 +30,78 @@ class MemoryProxy;
class ExecutionGroup; class ExecutionGroup;
/** /**
* @brief A MemoryProxy is a unique identifier for a memory buffer. * @brief A MemoryProxy is a unique identifier for a memory buffer.
* A single MemoryProxy is used among all chunks of the same buffer, * A single MemoryProxy is used among all chunks of the same buffer,
* the MemoryBuffer only stores the data of a single chunk. * the MemoryBuffer only stores the data of a single chunk.
* @ingroup Memory * @ingroup Memory
*/ */
class MemoryProxy { class MemoryProxy {
private: private:
/** /**
* @brief reference to the ouput operation of the executiongroup * @brief reference to the ouput operation of the executiongroup
*/ */
WriteBufferOperation *writeBufferOperation; WriteBufferOperation *writeBufferOperation;
/** /**
* @brief reference to the executor. the Execution group that can fill a chunk * @brief reference to the executor. the Execution group that can fill a chunk
*/ */
ExecutionGroup *executor; ExecutionGroup *executor;
/** /**
* @brief datatype of this MemoryProxy * @brief datatype of this MemoryProxy
*/ */
DataType datatype; DataType datatype;
/** /**
* @brief channel information of this buffer * @brief channel information of this buffer
*/ */
ChannelInfo channelInfo[COM_NUMBER_OF_CHANNELS]; ChannelInfo channelInfo[COM_NUMBER_OF_CHANNELS];
/** /**
* @brief the allocated memory * @brief the allocated memory
*/ */
MemoryBuffer* buffer; MemoryBuffer *buffer;
public: public:
MemoryProxy(); MemoryProxy();
/** /**
* @brief set the ExecutionGroup that can be scheduled to calculate a certain chunk. * @brief set the ExecutionGroup that can be scheduled to calculate a certain chunk.
* @param group the ExecutionGroup to set * @param group the ExecutionGroup to set
*/ */
void setExecutor(ExecutionGroup *executor) {this->executor = executor;} void setExecutor(ExecutionGroup *executor) { this->executor = executor; }
/**
* @brief get the ExecutionGroup that can be scheduled to calculate a certain chunk.
*/
ExecutionGroup *getExecutor() {return this->executor;}
/**
* @brief set the WriteBufferOperation that is responsible for writing to this MemoryProxy
* @param operation
*/
void setWriteBufferOperation(WriteBufferOperation *operation) {this->writeBufferOperation = operation;}
/**
* @brief get the WriteBufferOperation that is responsible for writing to this MemoryProxy
* @return WriteBufferOperation
*/
WriteBufferOperation *getWriteBufferOperation() {return this->writeBufferOperation;}
/** /**
* @brief allocate memory of size widht x height * @brief get the ExecutionGroup that can be scheduled to calculate a certain chunk.
*/ */
ExecutionGroup *getExecutor() { return this->executor; }
/**
* @brief set the WriteBufferOperation that is responsible for writing to this MemoryProxy
* @param operation
*/
void setWriteBufferOperation(WriteBufferOperation *operation) { this->writeBufferOperation = operation; }
/**
* @brief get the WriteBufferOperation that is responsible for writing to this MemoryProxy
* @return WriteBufferOperation
*/
WriteBufferOperation *getWriteBufferOperation() { return this->writeBufferOperation; }
/**
* @brief allocate memory of size widht x height
*/
void allocate(unsigned int width, unsigned int height); void allocate(unsigned int width, unsigned int height);
/** /**
* @brief free the allocated memory * @brief free the allocated memory
*/ */
void free(); void free();
/** /**
* @brief get the allocated memory * @brief get the allocated memory
*/ */
inline MemoryBuffer* getBuffer() {return this->buffer;} inline MemoryBuffer *getBuffer() { return this->buffer; }
}; };
#endif #endif

View File

@ -38,18 +38,18 @@ class Node;
class NodeOperation; class NodeOperation;
class ExecutionSystem; class ExecutionSystem;
typedef vector<Node*> NodeList; typedef vector<Node *> NodeList;
typedef NodeList::iterator NodeIterator; typedef NodeList::iterator NodeIterator;
typedef pair<NodeIterator, NodeIterator> NodeRange; typedef pair<NodeIterator, NodeIterator> NodeRange;
/** /**
* My node documentation. * My node documentation.
*/ */
class Node:public NodeBase { class Node : public NodeBase {
private: private:
/** /**
* @brief stores the reference to the SDNA bNode struct * @brief stores the reference to the SDNA bNode struct
*/ */
bNode *editorNode; bNode *editorNode;
/** /**
@ -58,18 +58,18 @@ private:
bool inActiveGroup; bool inActiveGroup;
public: public:
Node(bNode *editorNode, bool create_sockets=true); Node(bNode *editorNode, bool create_sockets = true);
/** /**
* @brief get the reference to the SDNA bNode struct * @brief get the reference to the SDNA bNode struct
*/ */
bNode *getbNode(); bNode *getbNode();
/** /**
* @brief Is this node in the active group (the group that is being edited) * @brief Is this node in the active group (the group that is being edited)
* @param isInActiveGroup * @param isInActiveGroup
*/ */
void setIsInActiveGroup(bool isInActiveGroup) {this->inActiveGroup = isInActiveGroup; } void setIsInActiveGroup(bool isInActiveGroup) { this->inActiveGroup = isInActiveGroup; }
/** /**
* @brief Is this node part of the active group * @brief Is this node part of the active group
@ -77,63 +77,63 @@ public:
* the active group will be the main tree (all nodes that are not part of a group will be active) * the active group will be the main tree (all nodes that are not part of a group will be active)
* @return bool [false:true] * @return bool [false:true]
*/ */
inline bool isInActiveGroup() {return this->inActiveGroup;} inline bool isInActiveGroup() { return this->inActiveGroup; }
/**
* @brief convert node to operation
*
* @todo this must be described furter
*
* @param system the ExecutionSystem where the operations need to be added
* @param context reference to the CompositorContext
*/
virtual void convertToOperations(ExecutionSystem *system, CompositorContext *context) = 0;
/** /**
* @brief convert node to operation * this method adds a SetValueOperation as input of the input socket.
* * This can only be used from the convertToOperation method. all other usages are not allowed
* @todo this must be described furter */
*
* @param system the ExecutionSystem where the operations need to be added
* @param context reference to the CompositorContext
*/
virtual void convertToOperations(ExecutionSystem *system, CompositorContext * context) =0;
/**
* this method adds a SetValueOperation as input of the input socket.
* This can only be used from the convertToOperation method. all other usages are not allowed
*/
void addSetValueOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex); void addSetValueOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex);
/** /**
* this method adds a SetColorOperation as input of the input socket. * this method adds a SetColorOperation as input of the input socket.
* This can only be used from the convertToOperation method. all other usages are not allowed * This can only be used from the convertToOperation method. all other usages are not allowed
*/ */
void addSetColorOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex); void addSetColorOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex);
/** /**
* this method adds a SetVectorOperation as input of the input socket. * this method adds a SetVectorOperation as input of the input socket.
* This can only be used from the convertToOperation method. all other usages are not allowed * This can only be used from the convertToOperation method. all other usages are not allowed
*/ */
void addSetVectorOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex); void addSetVectorOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex);
/** /**
* Creates a new link between an outputSocket and inputSocket and registrates the link to the graph * Creates a new link between an outputSocket and inputSocket and registrates the link to the graph
* @return the new created link * @return the new created link
*/ */
SocketConnection *addLink(ExecutionSystem *graph, OutputSocket *outputSocket, InputSocket *inputsocket); SocketConnection *addLink(ExecutionSystem *graph, OutputSocket *outputSocket, InputSocket *inputsocket);
/** /**
* is this node a group node. * is this node a group node.
*/ */
virtual bool isGroupNode() const { return false; } virtual bool isGroupNode() const { return false; }
/** /**
* is this node a proxy node. * is this node a proxy node.
*/ */
virtual bool isProxyNode() const { return false; } virtual bool isProxyNode() const { return false; }
/** /**
* @brief find the InputSocket by bNodeSocket * @brief find the InputSocket by bNodeSocket
* *
* @param socket * @param socket
*/ */
InputSocket *findInputSocketBybNodeSocket(bNodeSocket *socket); InputSocket *findInputSocketBybNodeSocket(bNodeSocket *socket);
/** /**
* @brief find the OutputSocket by bNodeSocket * @brief find the OutputSocket by bNodeSocket
* *
* @param socket * @param socket
*/ */
OutputSocket *findOutputSocketBybNodeSocket(bNodeSocket *socket); OutputSocket *findOutputSocketBybNodeSocket(bNodeSocket *socket);
protected: protected:

View File

@ -37,136 +37,136 @@ class NodeOperation;
class ExecutionSystem; class ExecutionSystem;
/** /**
* @brief The NodeBase class is the super-class of all node related objects like @see Node @see NodeOperation * @brief The NodeBase class is the super-class of all node related objects like @see Node @see NodeOperation
* the reason for the existence of this class is to support graph-nodes when using ExecutionSystem * the reason for the existence of this class is to support graph-nodes when using ExecutionSystem
* the NodeBase also contains the reference to InputSocket and OutputSocket. * the NodeBase also contains the reference to InputSocket and OutputSocket.
* @ingroup Model * @ingroup Model
*/ */
class NodeBase { class NodeBase {
private: private:
/** /**
* @brief the list of actual inputsockets @see InputSocket * @brief the list of actual inputsockets @see InputSocket
*/ */
vector<InputSocket*> inputsockets; vector<InputSocket *> inputsockets;
/** /**
* @brief the list of actual outputsockets @see OutputSocket * @brief the list of actual outputsockets @see OutputSocket
*/ */
vector<OutputSocket*> outputsockets; vector<OutputSocket *> outputsockets;
protected: protected:
/** /**
* @brief get access to the vector of input sockets * @brief get access to the vector of input sockets
*/ */
inline vector<InputSocket*>& getInputSockets() {return this->inputsockets;} inline vector<InputSocket *>& getInputSockets() { return this->inputsockets; }
/** /**
* @brief get access to the vector of input sockets * @brief get access to the vector of input sockets
*/ */
inline vector<OutputSocket*>& getOutputSockets() {return this->outputsockets;} inline vector<OutputSocket *>& getOutputSockets() { return this->outputsockets; }
public: public:
/** /**
* @brief destructor * @brief destructor
* clean up memory related to this NodeBase. * clean up memory related to this NodeBase.
*/ */
virtual ~NodeBase(); virtual ~NodeBase();
/** /**
* @brief determine the actual socket data types that will go through the system * @brief determine the actual socket data types that will go through the system
*/ */
virtual void determineActualSocketDataTypes(); virtual void determineActualSocketDataTypes();
/** /**
* @brief determine the actual socket data types of a specific outputsocket * @brief determine the actual socket data types of a specific outputsocket
* *
* @param outputsocket * @param outputsocket
* a reference to the actual outputsocket where the datatype must be determined from * a reference to the actual outputsocket where the datatype must be determined from
* *
* @return * @return
* COM_DT_VALUE if it is a value (1 float buffer) * COM_DT_VALUE if it is a value (1 float buffer)
* COM_DT_COLOR if it is a value (4 float buffer) * COM_DT_COLOR if it is a value (4 float buffer)
* COM_DT_VECTOR if it is a value (3 float buffer) * COM_DT_VECTOR if it is a value (3 float buffer)
*/ */
virtual DataType determineActualDataType(OutputSocket *outputsocket); virtual DataType determineActualDataType(OutputSocket *outputsocket);
/** /**
* @brief is this node an operation? * @brief is this node an operation?
* This is true when the instance is of the subclass NodeOperation. * This is true when the instance is of the subclass NodeOperation.
* @return [true:false] * @return [true:false]
* @see NodeOperation * @see NodeOperation
*/ */
virtual const int isOperation() const {return false;} virtual const int isOperation() const { return false; }
/** /**
* @brief check if this is an input node * @brief check if this is an input node
* An input node is a node that only has output sockets and no input sockets * An input node is a node that only has output sockets and no input sockets
* @return [false..true] * @return [false..true]
*/ */
const bool isInputNode() const; const bool isInputNode() const;
/** /**
* @brief Return the number of input sockets of this node. * @brief Return the number of input sockets of this node.
*/ */
const unsigned int getNumberOfInputSockets() const {return this->inputsockets.size();} const unsigned int getNumberOfInputSockets() const { return this->inputsockets.size(); }
/** /**
* @brief Return the number of output sockets of this node. * @brief Return the number of output sockets of this node.
*/ */
const unsigned int getNumberOfOutputSockets() const {return this->outputsockets.size();} const unsigned int getNumberOfOutputSockets() const { return this->outputsockets.size(); }
/** /**
* after the data has been determined of an outputsocket that has a connection with an inputsocket this method is called on the * after the data has been determined of an outputsocket that has a connection with an inputsocket this method is called on the
* node that contains the inputsocket. * node that contains the inputsocket.
* @param socket * @param socket
* the reference of the inputsocket where connected data type is found * the reference of the inputsocket where connected data type is found
* @param actualType [COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR] * @param actualType [COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR]
* the actual data type that is coming from the connected output socket * the actual data type that is coming from the connected output socket
*/ */
virtual void notifyActualDataTypeSet(InputSocket *socket, const DataType actualType); virtual void notifyActualDataTypeSet(InputSocket *socket, const DataType actualType);
/** /**
* get the reference to a certain outputsocket * get the reference to a certain outputsocket
* @param index * @param index
* the index of the needed outputsocket * the index of the needed outputsocket
*/ */
OutputSocket *getOutputSocket(const int index); OutputSocket *getOutputSocket(const int index);
/** /**
* get the reference to the first outputsocket * get the reference to the first outputsocket
* @param index * @param index
* the index of the needed outputsocket * the index of the needed outputsocket
*/ */
inline OutputSocket *getOutputSocket() {return getOutputSocket(0);} inline OutputSocket *getOutputSocket() { return getOutputSocket(0); }
/** /**
* get the reference to a certain inputsocket * get the reference to a certain inputsocket
* @param index * @param index
* the index of the needed inputsocket * the index of the needed inputsocket
*/ */
InputSocket *getInputSocket(const int index); InputSocket *getInputSocket(const int index);
virtual bool isStatic() const {return false;} virtual bool isStatic() const { return false; }
void getStaticValues(float *result) const {} void getStaticValues(float *result) const { }
protected: protected:
NodeBase(); NodeBase();
/** /**
* @brief add an InputSocket to the collection of inputsockets * @brief add an InputSocket to the collection of inputsockets
* @note may only be called in an constructor * @note may only be called in an constructor
* @param socket the InputSocket to add * @param socket the InputSocket to add
*/ */
void addInputSocket(DataType datatype); void addInputSocket(DataType datatype);
void addInputSocket(DataType datatype, InputSocketResizeMode resizeMode); void addInputSocket(DataType datatype, InputSocketResizeMode resizeMode);
void addInputSocket(DataType datatype, InputSocketResizeMode resizeMode, bNodeSocket *socket); void addInputSocket(DataType datatype, InputSocketResizeMode resizeMode, bNodeSocket *socket);
/** /**
* @brief add an OutputSocket to the collection of outputsockets * @brief add an OutputSocket to the collection of outputsockets
* @note may only be called in an constructor * @note may only be called in an constructor
* @param socket the OutputSocket to add * @param socket the OutputSocket to add
*/ */
void addOutputSocket(DataType datatype); void addOutputSocket(DataType datatype);
void addOutputSocket(DataType datatype, bNodeSocket *socket); void addOutputSocket(DataType datatype, bNodeSocket *socket);
}; };

View File

@ -41,41 +41,41 @@ class NodeOperation;
class ReadBufferOperation; class ReadBufferOperation;
/** /**
* @brief NodeOperation are contains calculation logic * @brief NodeOperation are contains calculation logic
* *
* Subclasses needs to implement the execution method (defined in SocketReader) to implement logic. * Subclasses needs to implement the execution method (defined in SocketReader) to implement logic.
* @ingroup Model * @ingroup Model
*/ */
class NodeOperation : public NodeBase, public SocketReader { class NodeOperation : public NodeBase, public SocketReader {
private: private:
/** /**
* @brief the index of the input socket that will be used to determine the resolution * @brief the index of the input socket that will be used to determine the resolution
*/ */
unsigned int resolutionInputSocketIndex; unsigned int resolutionInputSocketIndex;
/** /**
* @brief is this operation a complex one. * @brief is this operation a complex one.
* *
* Complex operations are typically doing many reads to calculate the output of a single pixel. * Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true. * Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/ */
bool complex; bool complex;
/** /**
* @brief can this operation be scheduled on an OpenCL device. * @brief can this operation be scheduled on an OpenCL device.
* @note Only applicable if complex is True * @note Only applicable if complex is True
*/ */
bool openCL; bool openCL;
/** /**
* @brief mutex reference for very special node initializations * @brief mutex reference for very special node initializations
* @note only use when you really know what you are doing. * @note only use when you really know what you are doing.
* this mutex is used to share data among chunks in the same operation * this mutex is used to share data among chunks in the same operation
* @see TonemapOperation for an example of usage * @see TonemapOperation for an example of usage
* @see NodeOperation.initMutex initializes this mutex * @see NodeOperation.initMutex initializes this mutex
* @see NodeOperation.deinitMutex deinitializes this mutex * @see NodeOperation.deinitMutex deinitializes this mutex
* @see NodeOperation.getMutex retrieve a pointer to this mutex. * @see NodeOperation.getMutex retrieve a pointer to this mutex.
*/ */
ThreadMutex mutex; ThreadMutex mutex;
/** /**
@ -85,87 +85,87 @@ private:
public: public:
/** /**
* @brief is this node an operation? * @brief is this node an operation?
* This is true when the instance is of the subclass NodeOperation. * This is true when the instance is of the subclass NodeOperation.
* @return [true:false] * @return [true:false]
* @see NodeBase * @see NodeBase
*/ */
const int isOperation() const {return true;} const int isOperation() const { return true; }
/** /**
* @brief determine the resolution of this node * @brief determine the resolution of this node
* @note this method will not set the resolution, this is the responsibility of the caller * @note this method will not set the resolution, this is the responsibility of the caller
* @param resolution the result of this operation * @param resolution the result of this operation
* @param preferredResolution the preferrable resolution as no resolution could be determined * @param preferredResolution the preferrable resolution as no resolution could be determined
*/ */
virtual void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]); virtual void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
/** /**
* @brief isOutputOperation determines whether this operation is an output of the ExecutionSystem during rendering or editing. * @brief isOutputOperation determines whether this operation is an output of the ExecutionSystem during rendering or editing.
* *
* Default behaviour if not overriden, this operation will not be evaluated as being an output of the ExecutionSystem. * Default behaviour if not overriden, this operation will not be evaluated as being an output of the ExecutionSystem.
* *
* @see ExecutionSystem * @see ExecutionSystem
* @group check * @group check
* @param rendering [true false] * @param rendering [true false]
* true: rendering * true: rendering
* false: editing * false: editing
* *
* @return bool the result of this method * @return bool the result of this method
*/ */
virtual bool isOutputOperation(bool rendering) const {return false;} virtual bool isOutputOperation(bool rendering) const { return false; }
/** /**
* isBufferOperation returns if this is an operation that work directly on buffers. * isBufferOperation returns if this is an operation that work directly on buffers.
* *
* there are only 2 implementation where this is true: * there are only 2 implementation where this is true:
* @see ReadBufferOperation * @see ReadBufferOperation
* @see WriteBufferOperation * @see WriteBufferOperation
* for all other operations this will result in false. * for all other operations this will result in false.
*/ */
virtual int isBufferOperation() {return false;} virtual int isBufferOperation() { return false; }
virtual int isSingleThreaded() {return false;} virtual int isSingleThreaded() { return false; }
void setbNodeTree(const bNodeTree * tree) {this->btree = tree;} void setbNodeTree(const bNodeTree *tree) { this->btree = tree; }
virtual void initExecution(); virtual void initExecution();
/** /**
* @brief when a chunk is executed by a CPUDevice, this method is called * @brief when a chunk is executed by a CPUDevice, this method is called
* @ingroup execution * @ingroup execution
* @param rect the rectangle of the chunk (location and size) * @param rect the rectangle of the chunk (location and size)
* @param chunkNumber the chunkNumber to be calculated * @param chunkNumber the chunkNumber to be calculated
* @param memoryBuffers all input MemoryBuffer's needed * @param memoryBuffers all input MemoryBuffer's needed
*/ */
virtual void executeRegion(rcti *rect, unsigned int chunkNumber, MemoryBuffer** memoryBuffers) {} virtual void executeRegion(rcti *rect, unsigned int chunkNumber, MemoryBuffer **memoryBuffers) {}
/** /**
* @brief when a chunk is executed by an OpenCLDevice, this method is called * @brief when a chunk is executed by an OpenCLDevice, this method is called
* @ingroup execution * @ingroup execution
* @note this method is only implemented in WriteBufferOperation * @note this method is only implemented in WriteBufferOperation
* @param context the OpenCL context * @param context the OpenCL context
* @param program the OpenCL program containing all compositor kernels * @param program the OpenCL program containing all compositor kernels
* @param queue the OpenCL command queue of the device the chunk is executed on * @param queue the OpenCL command queue of the device the chunk is executed on
* @param rect the rectangle of the chunk (location and size) * @param rect the rectangle of the chunk (location and size)
* @param chunkNumber the chunkNumber to be calculated * @param chunkNumber the chunkNumber to be calculated
* @param memoryBuffers all input MemoryBuffer's needed * @param memoryBuffers all input MemoryBuffer's needed
* @param outputBuffer the outputbuffer to write to * @param outputBuffer the outputbuffer to write to
*/ */
virtual void executeOpenCLRegion(cl_context context, cl_program program, cl_command_queue queue, rcti *rect, virtual void executeOpenCLRegion(cl_context context, cl_program program, cl_command_queue queue, rcti *rect,
unsigned int chunkNumber, MemoryBuffer** memoryBuffers, MemoryBuffer* outputBuffer) {} unsigned int chunkNumber, MemoryBuffer **memoryBuffers, MemoryBuffer *outputBuffer) {}
/** /**
* @brief custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevice * @brief custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevice
* @ingroup execution * @ingroup execution
* @param context the OpenCL context * @param context the OpenCL context
* @param program the OpenCL program containing all compositor kernels * @param program the OpenCL program containing all compositor kernels
* @param queue the OpenCL command queue of the device the chunk is executed on * @param queue the OpenCL command queue of the device the chunk is executed on
* @param outputMemoryBuffer the allocated memory buffer in main CPU memory * @param outputMemoryBuffer the allocated memory buffer in main CPU memory
* @param clOutputBuffer the allocated memory buffer in OpenCLDevice memory * @param clOutputBuffer the allocated memory buffer in OpenCLDevice memory
* @param inputMemoryBuffers all input MemoryBuffer's needed * @param inputMemoryBuffers all input MemoryBuffer's needed
* @param clMemToCleanUp all created cl_mem references must be added to this list. Framework will clean this after execution * @param clMemToCleanUp all created cl_mem references must be added to this list. Framework will clean this after execution
* @param clKernelsToCleanUp all created cl_kernel references must be added to this list. Framework will clean this after execution * @param clKernelsToCleanUp all created cl_kernel references must be added to this list. Framework will clean this after execution
*/ */
virtual void executeOpenCL(cl_context context,cl_program program, cl_command_queue queue, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer** inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, list<cl_kernel> *clKernelsToCleanUp) {} virtual void executeOpenCL(cl_context context, cl_program program, cl_command_queue queue, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, list<cl_kernel> *clKernelsToCleanUp) {}
virtual void deinitExecution(); virtual void deinitExecution();
bool isResolutionSet() { bool isResolutionSet() {
@ -173,9 +173,9 @@ public:
} }
/** /**
* @brief set the resolution * @brief set the resolution
* @param resolution the resolution to set * @param resolution the resolution to set
*/ */
void setResolution(unsigned int resolution[]) { void setResolution(unsigned int resolution[]) {
if (!isResolutionSet()) { if (!isResolutionSet()) {
this->width = resolution[0]; this->width = resolution[0];
@ -184,63 +184,63 @@ public:
} }
void getConnectedInputSockets(vector<InputSocket*> *sockets); void getConnectedInputSockets(vector<InputSocket *> *sockets);
/** /**
* @brief is this operation complex * @brief is this operation complex
* *
* Complex operations are typically doing many reads to calculate the output of a single pixel. * Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true. * Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/ */
const bool isComplex() const {return this->complex;} const bool isComplex() const { return this->complex; }
virtual const bool isSetOperation() const {return false;} virtual const bool isSetOperation() const { return false; }
/** /**
* @brief is this operation of type ReadBufferOperation * @brief is this operation of type ReadBufferOperation
* @return [true:false] * @return [true:false]
* @see ReadBufferOperation * @see ReadBufferOperation
*/ */
virtual const bool isReadBufferOperation() const {return false;} virtual const bool isReadBufferOperation() const { return false; }
/** /**
* @brief is this operation of type WriteBufferOperation * @brief is this operation of type WriteBufferOperation
* @return [true:false] * @return [true:false]
* @see WriteBufferOperation * @see WriteBufferOperation
*/ */
virtual const bool isWriteBufferOperation() const {return false;} virtual const bool isWriteBufferOperation() const { return false; }
/** /**
* @brief is this operation the active viewer output * @brief is this operation the active viewer output
* user can select an ViewerNode to be active (the result of this node will be drawn on the backdrop) * user can select an ViewerNode to be active (the result of this node will be drawn on the backdrop)
* @return [true:false] * @return [true:false]
* @see BaseViewerOperation * @see BaseViewerOperation
*/ */
virtual const bool isActiveViewerOutput() const {return false;} virtual const bool isActiveViewerOutput() const { return false; }
virtual bool determineDependingAreaOfInterest(rcti * input, ReadBufferOperation *readOperation, rcti *output); virtual bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
/** /**
* @brief set the index of the input socket that will determine the resolution of this operation * @brief set the index of the input socket that will determine the resolution of this operation
* @param index the index to set * @param index the index to set
*/ */
void setResolutionInputSocketIndex(unsigned int index); void setResolutionInputSocketIndex(unsigned int index);
/** /**
* @brief get the render priority of this node. * @brief get the render priority of this node.
* @note only applicable for output operations like ViewerOperation * @note only applicable for output operations like ViewerOperation
* @return CompositorPriority * @return CompositorPriority
*/ */
virtual const CompositorPriority getRenderPriority() const {return COM_PRIORITY_LOW;} virtual const CompositorPriority getRenderPriority() const { return COM_PRIORITY_LOW; }
/** /**
* @brief can this NodeOperation be scheduled on an OpenCLDevice * @brief can this NodeOperation be scheduled on an OpenCLDevice
* @see WorkScheduler.schedule * @see WorkScheduler.schedule
* @see ExecutionGroup.addOperation * @see ExecutionGroup.addOperation
*/ */
bool isOpenCL() { return this->openCL; } bool isOpenCL() { return this->openCL; }
virtual bool isViewerOperation() {return false;} virtual bool isViewerOperation() { return false; }
virtual bool isPreviewOperation() {return false;} virtual bool isPreviewOperation() { return false; }
inline bool isBreaked() { inline bool isBreaked() {
return btree->test_break(btree->tbh); return btree->test_break(btree->tbh);
@ -249,8 +249,8 @@ public:
protected: protected:
NodeOperation(); NodeOperation();
void setWidth(unsigned int width) {this->width = width;} void setWidth(unsigned int width) { this->width = width; }
void setHeight(unsigned int height) {this->height = height;} void setHeight(unsigned int height) { this->height = height; }
SocketReader *getInputSocketReader(unsigned int inputSocketindex); SocketReader *getInputSocketReader(unsigned int inputSocketindex);
NodeOperation *getInputOperation(unsigned int inputSocketindex); NodeOperation *getInputOperation(unsigned int inputSocketindex);
@ -261,25 +261,25 @@ protected:
/** /**
* @brief set whether this operation is complex * @brief set whether this operation is complex
* *
* Complex operations are typically doing many reads to calculate the output of a single pixel. * Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true. * Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/ */
void setComplex(bool complex) {this->complex = complex;} void setComplex(bool complex) { this->complex = complex; }
/** /**
* @brief set if this NodeOperation can be scheduled on a OpenCLDevice * @brief set if this NodeOperation can be scheduled on a OpenCLDevice
*/ */
void setOpenCL(bool openCL) {this->openCL = openCL;} void setOpenCL(bool openCL) { this->openCL = openCL; }
static cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_context context, cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, SocketReader* reader); static cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_context context, cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, SocketReader *reader);
static void COM_clAttachMemoryBufferOffsetToKernelParameter(cl_kernel kernel, int offsetIndex, MemoryBuffer *memoryBuffers); static void COM_clAttachMemoryBufferOffsetToKernelParameter(cl_kernel kernel, int offsetIndex, MemoryBuffer *memoryBuffers);
static void COM_clAttachOutputMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, cl_mem clOutputMemoryBuffer); static void COM_clAttachOutputMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, cl_mem clOutputMemoryBuffer);
void COM_clAttachSizeToKernelParameter(cl_kernel kernel, int offsetIndex); void COM_clAttachSizeToKernelParameter(cl_kernel kernel, int offsetIndex);
static void COM_clEnqueueRange(cl_command_queue queue, cl_kernel kernel, MemoryBuffer* outputMemoryBuffer); static void COM_clEnqueueRange(cl_command_queue queue, cl_kernel kernel, MemoryBuffer *outputMemoryBuffer);
void COM_clEnqueueRange(cl_command_queue queue, cl_kernel kernel, MemoryBuffer *outputMemoryBuffer, int offsetIndex); void COM_clEnqueueRange(cl_command_queue queue, cl_kernel kernel, MemoryBuffer *outputMemoryBuffer, int offsetIndex);
cl_kernel COM_clCreateKernel(cl_program program, const char* kernelname, list<cl_kernel> *clKernelsToCleanUp); cl_kernel COM_clCreateKernel(cl_program program, const char *kernelname, list<cl_kernel> *clKernelsToCleanUp);
}; };

View File

@ -31,57 +31,57 @@ class OpenCLDevice;
/** /**
* @brief device representing an GPU OpenCL device. * @brief device representing an GPU OpenCL device.
* an instance of this class represents a single cl_device * an instance of this class represents a single cl_device
*/ */
class OpenCLDevice: public Device { class OpenCLDevice : public Device {
private: private:
/** /**
*@brief opencl context *@brief opencl context
*/ */
cl_context context; cl_context context;
/** /**
*@brief opencl device *@brief opencl device
*/ */
cl_device_id device; cl_device_id device;
/** /**
*@brief opencl program *@brief opencl program
*/ */
cl_program program; cl_program program;
/** /**
*@brief opencl command queue *@brief opencl command queue
*/ */
cl_command_queue queue; cl_command_queue queue;
public: public:
/** /**
*@brief constructor with opencl device *@brief constructor with opencl device
*@param context *@param context
*@param device *@param device
*/ */
OpenCLDevice(cl_context context, cl_device_id device, cl_program program); OpenCLDevice(cl_context context, cl_device_id device, cl_program program);
/** /**
* @brief initialize the device * @brief initialize the device
* During initialization the OpenCL cl_command_queue is created * During initialization the OpenCL cl_command_queue is created
* the command queue is stored in the field queue. * the command queue is stored in the field queue.
* @see queue * @see queue
*/ */
bool initialize(); bool initialize();
/** /**
* @brief deinitialize the device * @brief deinitialize the device
* During deintiialization the command queue is cleared * During deintiialization the command queue is cleared
*/ */
void deinitialize(); void deinitialize();
/** /**
* @brief execute a WorkPackage * @brief execute a WorkPackage
* @param work the WorkPackage to execute * @param work the WorkPackage to execute
*/ */
void execute(WorkPackage *work); void execute(WorkPackage *work);
}; };

View File

@ -37,18 +37,18 @@ class WriteBufferOperation;
//#define COM_ST_OUTPUT 1 //#define COM_ST_OUTPUT 1
/** /**
* @brief OutputSocket are sockets that can send data/input * @brief OutputSocket are sockets that can send data/input
* @ingroup Model * @ingroup Model
*/ */
class OutputSocket : public Socket { class OutputSocket : public Socket {
private: private:
vector<SocketConnection*> connections; vector<SocketConnection *> connections;
/** /**
* @brief index of the inputsocket that determines the datatype of this outputsocket * @brief index of the inputsocket that determines the datatype of this outputsocket
* -1 will not use any inputsocket to determine the datatype, but use the outputsocket * -1 will not use any inputsocket to determine the datatype, but use the outputsocket
* default datatype. * default datatype.
*/ */
int inputSocketDataTypeDeterminatorIndex; int inputSocketDataTypeDeterminatorIndex;
ChannelInfo channelinfo[4]; ChannelInfo channelinfo[4];
@ -56,47 +56,47 @@ private:
public: public:
OutputSocket(DataType datatype); OutputSocket(DataType datatype);
OutputSocket(DataType datatype, int inputSocketDataTypeDeterminatorIndex); OutputSocket(DataType datatype, int inputSocketDataTypeDeterminatorIndex);
OutputSocket(OutputSocket * from); OutputSocket(OutputSocket *from);
void addConnection(SocketConnection *connection); void addConnection(SocketConnection *connection);
SocketConnection *getConnection(unsigned int index) {return this->connections[index];} SocketConnection *getConnection(unsigned int index) { return this->connections[index]; }
const int isConnected() const; const int isConnected() const;
int isOutputSocket() const; int isOutputSocket() const;
/** /**
* @brief determine the resolution of this socket * @brief determine the resolution of this socket
* @param resolution the result of this operation * @param resolution the result of this operation
* @param preferredResolution the preferrable resolution as no resolution could be determined * @param preferredResolution the preferrable resolution as no resolution could be determined
*/ */
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]); void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
/** /**
* @brief determine the actual data type and channel info. * @brief determine the actual data type and channel info.
*/ */
void determineActualDataType(); void determineActualDataType();
void relinkConnections(OutputSocket *relinkToSocket) {this->relinkConnections(relinkToSocket, false);}; void relinkConnections(OutputSocket *relinkToSocket) { this->relinkConnections(relinkToSocket, false); };
void relinkConnections(OutputSocket *relinkToSocket, bool single); void relinkConnections(OutputSocket *relinkToSocket, bool single);
bool isActualDataTypeDeterminedByInputSocket() { bool isActualDataTypeDeterminedByInputSocket() {
return this->inputSocketDataTypeDeterminatorIndex>-1; return this->inputSocketDataTypeDeterminatorIndex > -1;
} }
const int getNumberOfConnections() {return connections.size();} const int getNumberOfConnections() { return connections.size(); }
/** /**
* @brief get the index of the inputsocket that determines the datatype of this outputsocket * @brief get the index of the inputsocket that determines the datatype of this outputsocket
*/ */
int getInputSocketDataTypeDeterminatorIndex() {return this->inputSocketDataTypeDeterminatorIndex;} int getInputSocketDataTypeDeterminatorIndex() { return this->inputSocketDataTypeDeterminatorIndex; }
void clearConnections(); void clearConnections();
/** /**
* @brief find a connected write buffer operation to this OutputSocket * @brief find a connected write buffer operation to this OutputSocket
* @return WriteBufferOperation or NULL * @return WriteBufferOperation or NULL
*/ */
WriteBufferOperation *findAttachedWriteBufferOperation() const; WriteBufferOperation *findAttachedWriteBufferOperation() const;
ChannelInfo *getChannelInfo(const int channelnumber); ChannelInfo *getChannelInfo(const int channelnumber);
/** /**
* @brief trigger determine actual data type to all connected sockets * @brief trigger determine actual data type to all connected sockets
* @note will only be triggered just after the actual data type is set. * @note will only be triggered just after the actual data type is set.
*/ */
void fireActualDataType(); void fireActualDataType();
private: private:

View File

@ -37,24 +37,24 @@ public:
SingleThreadedNodeOperation(); SingleThreadedNodeOperation();
/** /**
* the inner loop of this program * the inner loop of this program
*/ */
void executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data); void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
/** /**
* Initialize the execution * Initialize the execution
*/ */
void initExecution(); void initExecution();
/** /**
* Deinitialize the execution * Deinitialize the execution
*/ */
void deinitExecution(); void deinitExecution();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers); void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
virtual MemoryBuffer* createMemoryBuffer(rcti *rect, MemoryBuffer **memoryBuffers) = 0; virtual MemoryBuffer *createMemoryBuffer(rcti *rect, MemoryBuffer **memoryBuffers) = 0;
int isSingleThreaded() {return true;} int isSingleThreaded() { return true; }
}; };
#endif #endif

View File

@ -34,33 +34,33 @@ class SocketConnection;
class NodeBase; class NodeBase;
/** /**
* @brief Base class for InputSocket and OutputSocket. * @brief Base class for InputSocket and OutputSocket.
* *
* A socket are the points on an node where the user can make a connection between. * A socket are the points on an node where the user can make a connection between.
* Sockets are always part of a node or an operation. * Sockets are always part of a node or an operation.
* *
* @see InputSocket * @see InputSocket
* @see OutputSocket * @see OutputSocket
* @see SocketConnection - a connection between an InputSocket and an OutputSocket * @see SocketConnection - a connection between an InputSocket and an OutputSocket
* @ingroup Model * @ingroup Model
*/ */
class Socket { class Socket {
private: private:
/** /**
* Reference to the node where this Socket belongs to * Reference to the node where this Socket belongs to
*/ */
NodeBase *node; NodeBase *node;
/** /**
* the datatype of this socket. Is used for automatically data transformation. * the datatype of this socket. Is used for automatically data transformation.
* @section data-conversion * @section data-conversion
*/ */
DataType datatype; DataType datatype;
/** /**
* the actual data type during execution. This can be different than the field datatype, based on the conversion rules of the node * the actual data type during execution. This can be different than the field datatype, based on the conversion rules of the node
* @section data-conversion * @section data-conversion
*/ */
DataType actualType; DataType actualType;
bNodeSocket *editorSocket; bNodeSocket *editorSocket;
@ -72,17 +72,17 @@ public:
NodeBase *getNode() const; NodeBase *getNode() const;
/** /**
* @brief get the actual data type * @brief get the actual data type
* *
* @note The actual data type can differ from the data type this socket expects. * @note The actual data type can differ from the data type this socket expects.
* @return actual DataType * @return actual DataType
*/ */
DataType getActualDataType() const; DataType getActualDataType() const;
/** /**
* @brief set the actual data type * @brief set the actual data type
* @param actualType the new actual type * @param actualType the new actual type
*/ */
void setActualDataType(DataType actualType); void setActualDataType(DataType actualType);
const virtual int isConnected() const; const virtual int isConnected() const;
@ -90,9 +90,9 @@ public:
int isOutputSocket() const; int isOutputSocket() const;
virtual void determineResolution(int resolution[], unsigned int preferredResolution[]) {} virtual void determineResolution(int resolution[], unsigned int preferredResolution[]) {}
virtual void determineActualDataType() {} virtual void determineActualDataType() {}
void setEditorSocket(bNodeSocket *editorSocket) {this->editorSocket = editorSocket;} void setEditorSocket(bNodeSocket *editorSocket) { this->editorSocket = editorSocket; }
bNodeSocket *getbNodeSocket() const {return this->editorSocket;} bNodeSocket *getbNodeSocket() const { return this->editorSocket; }
}; };

View File

@ -29,94 +29,94 @@
#include "COM_ChannelInfo.h" #include "COM_ChannelInfo.h"
/** /**
* @brief An SocketConnection is an connection between an InputSocket and an OutputSocket. * @brief An SocketConnection is an connection between an InputSocket and an OutputSocket.
* *
* <pre> * <pre>
* +----------+ To InputSocket +----------+ * +----------+ To InputSocket +----------+
* | From | SocketConnection \| To Node | * | From | SocketConnection \| To Node |
* | Node *====================* | * | Node *====================* |
* | |\ | | * | |\ | |
* | | From OutputSocket +----------+ * | | From OutputSocket +----------+
* +----------+ * +----------+
* </pre> * </pre>
* @ingroup Model * @ingroup Model
* @see InputSocket * @see InputSocket
* @see OutputSocket * @see OutputSocket
*/ */
class SocketConnection { class SocketConnection {
private: private:
/** /**
* @brief Startpoint of the connection * @brief Startpoint of the connection
*/ */
OutputSocket *fromSocket; OutputSocket *fromSocket;
/** /**
* @brief Endpoint of the connection * @brief Endpoint of the connection
*/ */
InputSocket *toSocket; InputSocket *toSocket;
/** /**
* @brief has the resize already been done for this connection * @brief has the resize already been done for this connection
*/ */
bool ignoreResizeCheck; bool ignoreResizeCheck;
public: public:
SocketConnection(); SocketConnection();
/** /**
* @brief set the startpoint of the connection * @brief set the startpoint of the connection
* @param fromsocket * @param fromsocket
*/ */
void setFromSocket(OutputSocket *fromsocket); void setFromSocket(OutputSocket *fromsocket);
/** /**
* @brief get the startpoint of the connection * @brief get the startpoint of the connection
* @return from OutputSocket * @return from OutputSocket
*/ */
OutputSocket *getFromSocket() const; OutputSocket *getFromSocket() const;
/** /**
* @brief set the endpoint of the connection * @brief set the endpoint of the connection
* @param tosocket * @param tosocket
*/ */
void setToSocket(InputSocket *tosocket); void setToSocket(InputSocket *tosocket);
/** /**
* @brief get the endpoint of the connection * @brief get the endpoint of the connection
* @return to InputSocket * @return to InputSocket
*/ */
InputSocket *getToSocket() const; InputSocket *getToSocket() const;
/** /**
* @brief check if this connection is valid * @brief check if this connection is valid
*/ */
bool isValid() const; bool isValid() const;
/** /**
* @brief return the Node where this connection is connected from * @brief return the Node where this connection is connected from
*/ */
NodeBase * getFromNode() const; NodeBase *getFromNode() const;
/** /**
* @brief return the Node where this connection is connected to * @brief return the Node where this connection is connected to
*/ */
NodeBase * getToNode() const; NodeBase *getToNode() const;
/** /**
* @brief set, whether the resize has already been done for this SocketConnection * @brief set, whether the resize has already been done for this SocketConnection
*/ */
void setIgnoreResizeCheck(bool check) {this->ignoreResizeCheck = check;} void setIgnoreResizeCheck(bool check) { this->ignoreResizeCheck = check; }
/** /**
* @brief has the resize already been done for this SocketConnection * @brief has the resize already been done for this SocketConnection
*/ */
bool isIgnoreResizeCheck() const { return this->ignoreResizeCheck;} bool isIgnoreResizeCheck() const { return this->ignoreResizeCheck; }
/** /**
* @brief does this SocketConnection need resolution conversion * @brief does this SocketConnection need resolution conversion
* @note PreviewOperation's will be ignored * @note PreviewOperation's will be ignored
* @note Already converted SocketConnection's will be ignored * @note Already converted SocketConnection's will be ignored
* @return needs conversion [true:false] * @return needs conversion [true:false]
*/ */
bool needsResolutionConversion() const; bool needsResolutionConversion() const;
}; };

View File

@ -33,43 +33,43 @@ typedef enum PixelSampler {
class MemoryBuffer; class MemoryBuffer;
/** /**
* @brief Helper class for reading socket data. * @brief Helper class for reading socket data.
* Only use this class for dispatching (un-ary and n-ary) executions. * Only use this class for dispatching (un-ary and n-ary) executions.
* @ingroup Execution * @ingroup Execution
*/ */
class SocketReader { class SocketReader {
private: private:
protected: protected:
/** /**
* @brief Holds the width of the output of this operation. * @brief Holds the width of the output of this operation.
*/ */
unsigned int width; unsigned int width;
/** /**
* @brief Holds the height of the output of this operation. * @brief Holds the height of the output of this operation.
*/ */
unsigned int height; unsigned int height;
/** /**
* @brief calculate a single pixel * @brief calculate a single pixel
* @note this method is called for non-complex * @note this method is called for non-complex
* @param result is a float[4] array to store the result * @param result is a float[4] array to store the result
* @param x the x-coordinate of the pixel to calculate in image space * @param x the x-coordinate of the pixel to calculate in image space
* @param y the y-coordinate of the pixel to calculate in image space * @param y the y-coordinate of the pixel to calculate in image space
* @param inputBuffers chunks that can be read by their ReadBufferOperation. * @param inputBuffers chunks that can be read by their ReadBufferOperation.
*/ */
virtual void executePixel(float *result, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) {} virtual void executePixel(float *result, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) {}
/** /**
* @brief calculate a single pixel * @brief calculate a single pixel
* @note this method is called for complex * @note this method is called for complex
* @param result is a float[4] array to store the result * @param result is a float[4] array to store the result
* @param x the x-coordinate of the pixel to calculate in image space * @param x the x-coordinate of the pixel to calculate in image space
* @param y the y-coordinate of the pixel to calculate in image space * @param y the y-coordinate of the pixel to calculate in image space
* @param inputBuffers chunks that can be read by their ReadBufferOperation. * @param inputBuffers chunks that can be read by their ReadBufferOperation.
* @param chunkData chunk specific data a during execution time. * @param chunkData chunk specific data a during execution time.
*/ */
virtual void executePixel(float *result, int x, int y, MemoryBuffer *inputBuffers[], void *chunkData) { virtual void executePixel(float *result, int x, int y, MemoryBuffer *inputBuffers[], void *chunkData) {
executePixel(result, x, y, COM_PS_NEAREST, inputBuffers); executePixel(result, x, y, COM_PS_NEAREST, inputBuffers);
} }
@ -97,17 +97,15 @@ public:
executePixel(result, x, y, dx, dy, inputBuffers); executePixel(result, x, y, dx, dy, inputBuffers);
} }
virtual void *initializeTileData(rcti *rect, MemoryBuffer** memoryBuffers) { virtual void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers) { return 0; }
return 0; virtual void deinitializeTileData(rcti *rect, MemoryBuffer **memoryBuffers, void *data) {
}
virtual void deinitializeTileData(rcti *rect, MemoryBuffer** memoryBuffers, void *data) {
} }
virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer** memoryBuffers) {return 0;} virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return 0; }
inline const unsigned int getWidth() const {return this->width;} inline const unsigned int getWidth() const { return this->width; }
inline const unsigned int getHeight() const {return this->height;} inline const unsigned int getHeight() const { return this->height; }
}; };
#endif #endif

View File

@ -28,37 +28,37 @@ class WorkPackage;
#include "COM_ExecutionGroup.h" #include "COM_ExecutionGroup.h"
/** /**
* @brief contains data about work that can be scheduled * @brief contains data about work that can be scheduled
* @see WorkScheduler * @see WorkScheduler
*/ */
class WorkPackage { class WorkPackage {
private: private:
/** /**
* @brief executionGroup with the operations-setup to be evaluated * @brief executionGroup with the operations-setup to be evaluated
*/ */
ExecutionGroup *executionGroup; ExecutionGroup *executionGroup;
/** /**
* @brief number of the chunk to be executed * @brief number of the chunk to be executed
*/ */
unsigned int chunkNumber; unsigned int chunkNumber;
public: public:
/** /**
* @constructor * @constructor
* @param group the ExecutionGroup * @param group the ExecutionGroup
* @param chunkNumber the number of the chunk * @param chunkNumber the number of the chunk
*/ */
WorkPackage(ExecutionGroup *group, unsigned int chunkNumber); WorkPackage(ExecutionGroup *group, unsigned int chunkNumber);
/** /**
* @brief get the ExecutionGroup * @brief get the ExecutionGroup
*/ */
ExecutionGroup *getExecutionGroup() const {return this->executionGroup;} ExecutionGroup *getExecutionGroup() const { return this->executionGroup; }
/** /**
* @brief get the number of the chunk * @brief get the number of the chunk
*/ */
unsigned int getChunkNumber() const {return this->chunkNumber;} unsigned int getChunkNumber() const { return this->chunkNumber; }
}; };
#endif #endif

View File

@ -32,83 +32,83 @@ extern "C" {
#include "COM_Device.h" #include "COM_Device.h"
/** @brief the workscheduler /** @brief the workscheduler
* @ingroup execution * @ingroup execution
*/ */
class WorkScheduler { class WorkScheduler {
#if COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE #if COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
/** /**
* @brief are we being stopped. * @brief are we being stopped.
*/ */
static bool isStopping(); static bool isStopping();
/** /**
* @brief main thread loop for cpudevices * @brief main thread loop for cpudevices
* inside this loop new work is queried and being executed * inside this loop new work is queried and being executed
*/ */
static void *thread_execute_cpu(void *data); static void *thread_execute_cpu(void *data);
/** /**
* @brief main thread loop for gpudevices * @brief main thread loop for gpudevices
* inside this loop new work is queried and being executed * inside this loop new work is queried and being executed
*/ */
static void *thread_execute_gpu(void *data); static void *thread_execute_gpu(void *data);
#endif #endif
public: public:
/** /**
* @brief schedule a chunk of a group to be calculated. * @brief schedule a chunk of a group to be calculated.
* An execution group schedules a chunk in the WorkScheduler * An execution group schedules a chunk in the WorkScheduler
* when ExecutionGroup.isOpenCL is set the work will be handled by a OpenCLDevice * when ExecutionGroup.isOpenCL is set the work will be handled by a OpenCLDevice
* otherwide the work is scheduled for an CPUDevice * otherwide the work is scheduled for an CPUDevice
* @see ExecutionGroup.execute * @see ExecutionGroup.execute
* @param group the execution group * @param group the execution group
* @param chunkNumber the number of the chunk in the group to be executed * @param chunkNumber the number of the chunk in the group to be executed
*/ */
static void schedule(ExecutionGroup *group, int chunkNumber); static void schedule(ExecutionGroup *group, int chunkNumber);
/** /**
* @brief initialize the WorkScheduler * @brief initialize the WorkScheduler
* *
* during initialization the mutexes are initialized. * during initialization the mutexes are initialized.
* there are two mutexes (for every device type one) * there are two mutexes (for every device type one)
* After mutex initialization the system is queried in order to count the number of CPUDevices and GPUDevices to be created. * After mutex initialization the system is queried in order to count the number of CPUDevices and GPUDevices to be created.
* For every hardware thread a CPUDevice and for every OpenCL GPU device a OpenCLDevice is created. * For every hardware thread a CPUDevice and for every OpenCL GPU device a OpenCLDevice is created.
* these devices are stored in a separate list (cpudevices & gpudevices) * these devices are stored in a separate list (cpudevices & gpudevices)
*/ */
static void initialize(); static void initialize();
/** /**
* @brief deinitialize the WorkScheduler * @brief deinitialize the WorkScheduler
* free all allocated resources * free all allocated resources
*/ */
static void deinitialize(); static void deinitialize();
/** /**
* @brief Start the execution * @brief Start the execution
* this methods will start the WorkScheduler. Inside this method all threads are initialized. * this methods will start the WorkScheduler. Inside this method all threads are initialized.
* for every device a thread is created. * for every device a thread is created.
* @see initialize Initialization and query of the number of devices * @see initialize Initialization and query of the number of devices
*/ */
static void start(CompositorContext &context); static void start(CompositorContext &context);
/** /**
* @brief stop the execution * @brief stop the execution
* All created thread by the start method are destroyed. * All created thread by the start method are destroyed.
* @see start * @see start
*/ */
static void stop(); static void stop();
/** /**
* @brief wait for all work to be completed. * @brief wait for all work to be completed.
*/ */
static void finish(); static void finish();
/** /**
* @brief Are there OpenCL capable GPU devices initialized? * @brief Are there OpenCL capable GPU devices initialized?
* the result of this method is stored in the CompositorContext * the result of this method is stored in the CompositorContext
* A node can generate a different operation tree when OpenCLDevices exists. * A node can generate a different operation tree when OpenCLDevices exists.
* @see CompositorContext.getHasActiveOpenCLDevices * @see CompositorContext.getHasActiveOpenCLDevices
*/ */
static bool hasGPUDevices(); static bool hasGPUDevices();
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief AlphaOverNode * @brief AlphaOverNode
* @ingroup Node * @ingroup Node
*/ */
class AlphaOverNode: public Node { class AlphaOverNode : public Node {
public: public:
AlphaOverNode(bNode *editorNode) :Node(editorNode) {} AlphaOverNode(bNode *editorNode) : Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief BilateralBlurNode * @brief BilateralBlurNode
* @ingroup Node * @ingroup Node
*/ */
class BilateralBlurNode: public Node { class BilateralBlurNode : public Node {
public: public:
BilateralBlurNode(bNode *editorNode); BilateralBlurNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief BlurNode * @brief BlurNode
* @ingroup Node * @ingroup Node
*/ */
class BlurNode: public Node { class BlurNode : public Node {
public: public:
BlurNode(bNode *editorNode); BlurNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief BokehBlurNode * @brief BokehBlurNode
* @ingroup Node * @ingroup Node
*/ */
class BokehBlurNode: public Node { class BokehBlurNode : public Node {
public: public:
BokehBlurNode(bNode *editorNode); BokehBlurNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief BokehImageNode * @brief BokehImageNode
* @ingroup Node * @ingroup Node
*/ */
class BokehImageNode: public Node { class BokehImageNode : public Node {
public: public:
BokehImageNode(bNode *editorNode); BokehImageNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief BoxMaskNode * @brief BoxMaskNode
* @ingroup Node * @ingroup Node
*/ */
class BoxMaskNode: public Node { class BoxMaskNode : public Node {
public: public:
BoxMaskNode(bNode *editorNode); BoxMaskNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief BrightnessNode * @brief BrightnessNode
* @ingroup Node * @ingroup Node
*/ */
class BrightnessNode: public Node { class BrightnessNode : public Node {
public: public:
BrightnessNode(bNode *editorNode); BrightnessNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -25,9 +25,9 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ChannelMatteNode * @brief ChannelMatteNode
* @ingroup Node * @ingroup Node
*/ */
class ChannelMatteNode : public Node class ChannelMatteNode : public Node
{ {
public: public:

View File

@ -25,9 +25,9 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ChromaMatteNode * @brief ChromaMatteNode
* @ingroup Node * @ingroup Node
*/ */
class ChromaMatteNode : public Node class ChromaMatteNode : public Node
{ {
public: public:

View File

@ -26,9 +26,9 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ColorBalanceNode * @brief ColorBalanceNode
* @ingroup Node * @ingroup Node
*/ */
class ColorBalanceNode : public Node class ColorBalanceNode : public Node
{ {
public: public:

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ColorCorrectionNode * @brief ColorCorrectionNode
* @ingroup Node * @ingroup Node
*/ */
class ColorCorrectionNode: public Node { class ColorCorrectionNode : public Node {
public: public:
ColorCorrectionNode(bNode *editorNode); ColorCorrectionNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ColorCurveNode * @brief ColorCurveNode
* @ingroup Node * @ingroup Node
*/ */
class ColorCurveNode: public Node { class ColorCurveNode : public Node {
public: public:
ColorCurveNode(bNode *editorNode); ColorCurveNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -25,9 +25,9 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ColorMatteNode * @brief ColorMatteNode
* @ingroup Node * @ingroup Node
*/ */
class ColorMatteNode : public Node class ColorMatteNode : public Node
{ {
public: public:

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ColorNode * @brief ColorNode
* @ingroup Node * @ingroup Node
*/ */
class ColorNode: public Node { class ColorNode : public Node {
public: public:
ColorNode(bNode *editorNode); ColorNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ColorRampNode * @brief ColorRampNode
* @ingroup Node * @ingroup Node
*/ */
class ColorRampNode : public Node class ColorRampNode : public Node
{ {
public: public:
ColorRampNode(bNode *editorNode); ColorRampNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif // COM_ColorRampNODE_H #endif // COM_ColorRampNODE_H

View File

@ -26,9 +26,9 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ColorSpillNode * @brief ColorSpillNode
* @ingroup Node * @ingroup Node
*/ */
class ColorSpillNode : public Node class ColorSpillNode : public Node
{ {
public: public:

View File

@ -26,12 +26,12 @@
#include "COM_Node.h" #include "COM_Node.h"
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief ColourToBWNode * @brief ColourToBWNode
* @ingroup Node * @ingroup Node
*/ */
class ColourToBWNode : public Node { class ColourToBWNode : public Node {
public: public:
ColourToBWNode(bNode *editorNode); ColourToBWNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -27,12 +27,12 @@
#include "DNA_node_types.h" #include "DNA_node_types.h"
#include "COM_CombineRGBANode.h" #include "COM_CombineRGBANode.h"
/** /**
* @brief CombineHSVANode * @brief CombineHSVANode
* @ingroup Node * @ingroup Node
*/ */
class CombineHSVANode : public CombineRGBANode { class CombineHSVANode : public CombineRGBANode {
public: public:
CombineHSVANode(bNode *editorNode); CombineHSVANode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,12 +26,12 @@
#include "COM_Node.h" #include "COM_Node.h"
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief CombineRGBANode * @brief CombineRGBANode
* @ingroup Node * @ingroup Node
*/ */
class CombineRGBANode : public Node { class CombineRGBANode : public Node {
public: public:
CombineRGBANode(bNode *editorNode); CombineRGBANode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,9 +26,9 @@
#include "DNA_node_types.h" #include "DNA_node_types.h"
#include "COM_CombineRGBANode.h" #include "COM_CombineRGBANode.h"
/** /**
* @brief CombineYCCANode * @brief CombineYCCANode
* @ingroup Node * @ingroup Node
*/ */
class CombineYCCANode : public CombineRGBANode { class CombineYCCANode : public CombineRGBANode {
public: public:
CombineYCCANode(bNode *editorNode); CombineYCCANode(bNode *editorNode);

View File

@ -26,9 +26,9 @@
#include "DNA_node_types.h" #include "DNA_node_types.h"
#include "COM_CombineRGBANode.h" #include "COM_CombineRGBANode.h"
/** /**
* @brief CombineYUVANode * @brief CombineYUVANode
* @ingroup Node * @ingroup Node
*/ */
class CombineYUVANode : public CombineRGBANode { class CombineYUVANode : public CombineRGBANode {
public: public:
CombineYUVANode(bNode *editorNode); CombineYUVANode(bNode *editorNode);

View File

@ -26,12 +26,12 @@
#include "COM_Node.h" #include "COM_Node.h"
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief CompositorNode * @brief CompositorNode
* @ingroup Node * @ingroup Node
*/ */
class CompositorNode : public Node { class CompositorNode : public Node {
public: public:
CompositorNode(bNode *editorNode); CompositorNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -25,13 +25,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ConvertAlphaNode * @brief ConvertAlphaNode
* @ingroup Node * @ingroup Node
*/ */
class ConvertAlphaNode: public Node { class ConvertAlphaNode : public Node {
public: public:
ConvertAlphaNode(bNode *editorNode) :Node(editorNode) {} ConvertAlphaNode(bNode *editorNode) : Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -25,10 +25,10 @@
#include "COM_Node.h" #include "COM_Node.h"
class CropNode: public Node { class CropNode : public Node {
public: public:
CropNode(bNode *editorNode); CropNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief DefocusNode * @brief DefocusNode
* @ingroup Node * @ingroup Node
*/ */
class DefocusNode: public Node { class DefocusNode : public Node {
public: public:
DefocusNode(bNode *editorNode); DefocusNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief DifferenceMatteNode * @brief DifferenceMatteNode
* @ingroup Node * @ingroup Node
*/ */
class DifferenceMatteNode : public Node class DifferenceMatteNode : public Node
{ {
public: public:
DifferenceMatteNode(bNode *editorNode); DifferenceMatteNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif // COM_DifferenceMatteNODE_H #endif // COM_DifferenceMatteNODE_H

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief DilateErodeNode * @brief DilateErodeNode
* @ingroup Node * @ingroup Node
*/ */
class DilateErodeNode: public Node { class DilateErodeNode : public Node {
public: public:
DilateErodeNode(bNode *editorNode); DilateErodeNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief DirectionalBlurNode * @brief DirectionalBlurNode
* @ingroup Node * @ingroup Node
*/ */
class DirectionalBlurNode: public Node { class DirectionalBlurNode : public Node {
public: public:
DirectionalBlurNode(bNode *editorNode); DirectionalBlurNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -31,6 +31,6 @@
class DisplaceNode : public Node { class DisplaceNode : public Node {
public: public:
DisplaceNode(bNode *editorNode); DisplaceNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -25,9 +25,9 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief DistanceMatteNode * @brief DistanceMatteNode
* @ingroup Node * @ingroup Node
*/ */
class DistanceMatteNode : public Node class DistanceMatteNode : public Node
{ {
public: public:

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief DoubleEdgeMaskNode * @brief DoubleEdgeMaskNode
* @ingroup Node * @ingroup Node
*/ */
class DoubleEdgeMaskNode: public Node { class DoubleEdgeMaskNode : public Node {
public: public:
DoubleEdgeMaskNode(bNode *editorNode); DoubleEdgeMaskNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief EllipseMaskNode * @brief EllipseMaskNode
* @ingroup Node * @ingroup Node
*/ */
class EllipseMaskNode: public Node { class EllipseMaskNode : public Node {
public: public:
EllipseMaskNode(bNode *editorNode); EllipseMaskNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief FilterNode * @brief FilterNode
* @ingroup Node * @ingroup Node
*/ */
class FilterNode : public Node class FilterNode : public Node
{ {
public: public:
FilterNode(bNode *editorNode); FilterNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif // COM_FILTERNODE_H #endif // COM_FILTERNODE_H

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief FlipNode * @brief FlipNode
* @ingroup Node * @ingroup Node
*/ */
class FlipNode: public Node { class FlipNode : public Node {
public: public:
FlipNode(bNode *editorNode); FlipNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief GammaNode * @brief GammaNode
* @ingroup Node * @ingroup Node
*/ */
class GammaNode: public Node { class GammaNode : public Node {
public: public:
GammaNode(bNode *editorNode); GammaNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief GlareNode * @brief GlareNode
* @ingroup Node * @ingroup Node
*/ */
class GlareNode: public Node { class GlareNode : public Node {
public: public:
GlareNode(bNode *editorNode); GlareNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -27,30 +27,30 @@
#include "COM_ExecutionSystem.h" #include "COM_ExecutionSystem.h"
/** /**
* @brief Represents a group node * @brief Represents a group node
* @ingroup Node * @ingroup Node
*/ */
class GroupNode: public Node { class GroupNode : public Node {
public: public:
GroupNode(bNode *editorNode); GroupNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
/** /**
* @brief check if this node a group node. * @brief check if this node a group node.
* @returns true * @returns true
*/ */
bool isGroupNode() const { return true; } bool isGroupNode() const { return true; }
/** /**
* @brief ungroup this group node. * @brief ungroup this group node.
* during ungroup the subtree (internal nodes and links) of the group node * during ungroup the subtree (internal nodes and links) of the group node
* are added to the ExecutionSystem. * are added to the ExecutionSystem.
* *
* Between the main tree and the subtree proxy nodes will be added * Between the main tree and the subtree proxy nodes will be added
* to translate between InputSocket and OutputSocket * to translate between InputSocket and OutputSocket
* *
* @param system the ExecutionSystem where to add the subtree * @param system the ExecutionSystem where to add the subtree
*/ */
void ungroup(ExecutionSystem &system); void ungroup(ExecutionSystem &system);
}; };

View File

@ -26,12 +26,12 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief HueSaturationValueCorrectNode * @brief HueSaturationValueCorrectNode
* @ingroup Node * @ingroup Node
*/ */
class HueSaturationValueCorrectNode : public Node { class HueSaturationValueCorrectNode : public Node {
public: public:
HueSaturationValueCorrectNode(bNode *editorNode); HueSaturationValueCorrectNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,12 +26,12 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief HueSaturationValueNode * @brief HueSaturationValueNode
* @ingroup Node * @ingroup Node
*/ */
class HueSaturationValueNode : public Node { class HueSaturationValueNode : public Node {
public: public:
HueSaturationValueNode(bNode *editorNode); HueSaturationValueNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief IDMaskNode * @brief IDMaskNode
* @ingroup Node * @ingroup Node
*/ */
class IDMaskNode: public Node { class IDMaskNode : public Node {
public: public:
IDMaskNode(bNode *editorNode); IDMaskNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -30,15 +30,15 @@ extern "C" {
} }
/** /**
* @brief ImageNode * @brief ImageNode
* @ingroup Node * @ingroup Node
*/ */
class ImageNode : public Node { class ImageNode : public Node {
private: private:
NodeOperation *doMultilayerCheck(ExecutionSystem *system, RenderLayer *rl, Image *image, ImageUser *user, int framenumber, int outputsocketIndex, int pass, DataType datatype); NodeOperation *doMultilayerCheck(ExecutionSystem *system, RenderLayer *rl, Image *image, ImageUser *user, int framenumber, int outputsocketIndex, int pass, DataType datatype);
public: public:
ImageNode(bNode *editorNode); ImageNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief InvertNode * @brief InvertNode
* @ingroup Node * @ingroup Node
*/ */
class InvertNode: public Node { class InvertNode : public Node {
public: public:
InvertNode(bNode *editorNode); InvertNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief LensDistortionNode * @brief LensDistortionNode
* @ingroup Node * @ingroup Node
*/ */
class LensDistortionNode: public Node { class LensDistortionNode : public Node {
public: public:
LensDistortionNode(bNode *editorNode); LensDistortionNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -25,9 +25,9 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief LuminanceMatteNode * @brief LuminanceMatteNode
* @ingroup Node * @ingroup Node
*/ */
class LuminanceMatteNode : public Node class LuminanceMatteNode : public Node
{ {
public: public:

View File

@ -31,6 +31,6 @@
class MapUVNode : public Node { class MapUVNode : public Node {
public: public:
MapUVNode(bNode *editorNode); MapUVNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,12 +26,12 @@
#include "COM_Node.h" #include "COM_Node.h"
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief MapValueNode * @brief MapValueNode
* @ingroup Node * @ingroup Node
*/ */
class MapValueNode : public Node { class MapValueNode : public Node {
public: public:
MapValueNode(bNode *editorNode); MapValueNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -25,9 +25,9 @@
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief MaskNode * @brief MaskNode
* @ingroup Node * @ingroup Node
*/ */
class MaskNode : public Node { class MaskNode : public Node {

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief MathNode * @brief MathNode
* @ingroup Node * @ingroup Node
*/ */
class MathNode: public Node { class MathNode : public Node {
public: public:
MathNode(bNode *editorNode) :Node(editorNode) {} MathNode(bNode *editorNode) : Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,12 +26,12 @@
#include "COM_Node.h" #include "COM_Node.h"
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief MixNode * @brief MixNode
* @ingroup Node * @ingroup Node
*/ */
class MixNode : public Node { class MixNode : public Node {
public: public:
MixNode(bNode *editorNode); MixNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -24,14 +24,14 @@
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief MovieClipNode * @brief MovieClipNode
* @ingroup Node * @ingroup Node
*/ */
class MovieClipNode : public Node { class MovieClipNode : public Node {
public: public:
MovieClipNode(bNode *editorNode); MovieClipNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief MovieDistortionNode * @brief MovieDistortionNode
* @ingroup Node * @ingroup Node
*/ */
class MovieDistortionNode: public Node { class MovieDistortionNode : public Node {
public: public:
MovieDistortionNode(bNode *editorNode); MovieDistortionNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,15 +26,15 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief MuteNode * @brief MuteNode
* @ingroup Node * @ingroup Node
*/ */
class MuteNode: public Node { class MuteNode : public Node {
public: public:
MuteNode(bNode *editorNode); MuteNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
private: private:
void reconnect(ExecutionSystem *graph, OutputSocket * output); void reconnect(ExecutionSystem *graph, OutputSocket *output);
}; };
#endif #endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief NormalNode * @brief NormalNode
* @ingroup Node * @ingroup Node
*/ */
class NormalNode : public Node class NormalNode : public Node
{ {
public: public:
NormalNode(bNode *editorNode); NormalNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif // COM_NormalNODE_H #endif // COM_NormalNODE_H

View File

@ -25,13 +25,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief NormalizeNode * @brief NormalizeNode
* @ingroup Node * @ingroup Node
*/ */
class NormalizeNode: public Node { class NormalizeNode : public Node {
public: public:
NormalizeNode(bNode *editorNode); NormalizeNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -28,13 +28,13 @@
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief OutputFileNode * @brief OutputFileNode
* @ingroup Node * @ingroup Node
*/ */
class OutputFileNode : public Node { class OutputFileNode : public Node {
public: public:
OutputFileNode(bNode *editorNode); OutputFileNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -25,13 +25,13 @@
#include "COM_RenderLayersBaseProg.h" #include "COM_RenderLayersBaseProg.h"
/** /**
* @brief RenderLayersNode * @brief RenderLayersNode
* @ingroup Node * @ingroup Node
*/ */
class RenderLayersNode : public Node { class RenderLayersNode : public Node {
public: public:
RenderLayersNode(bNode *editorNode); RenderLayersNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
private: private:
void testSocketConnection(ExecutionSystem *graph, int outputSocketNumber, RenderLayersBaseProg * operation); void testSocketConnection(ExecutionSystem *graph, int outputSocketNumber, RenderLayersBaseProg *operation);
}; };

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief RotateNode * @brief RotateNode
* @ingroup Node * @ingroup Node
*/ */
class RotateNode: public Node { class RotateNode : public Node {
public: public:
RotateNode(bNode *editorNode); RotateNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ScaleNode * @brief ScaleNode
* @ingroup Node * @ingroup Node
*/ */
class ScaleNode: public Node { class ScaleNode : public Node {
public: public:
ScaleNode(bNode *editorNode); ScaleNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -28,12 +28,12 @@
#include "COM_SeparateRGBANode.h" #include "COM_SeparateRGBANode.h"
/** /**
* @brief SeparateHSVANode * @brief SeparateHSVANode
* @ingroup Node * @ingroup Node
*/ */
class SeparateHSVANode : public SeparateRGBANode { class SeparateHSVANode : public SeparateRGBANode {
public: public:
SeparateHSVANode(bNode *editorNode); SeparateHSVANode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,12 +26,12 @@
#include "COM_Node.h" #include "COM_Node.h"
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief SeparateRGBANode * @brief SeparateRGBANode
* @ingroup Node * @ingroup Node
*/ */
class SeparateRGBANode : public Node { class SeparateRGBANode : public Node {
public: public:
SeparateRGBANode(bNode *editorNode); SeparateRGBANode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -27,9 +27,9 @@
#include "COM_SeparateRGBANode.h" #include "COM_SeparateRGBANode.h"
/** /**
* @brief SeparateYCCANode * @brief SeparateYCCANode
* @ingroup Node * @ingroup Node
*/ */
class SeparateYCCANode : public SeparateRGBANode { class SeparateYCCANode : public SeparateRGBANode {
public: public:
SeparateYCCANode(bNode *editorNode); SeparateYCCANode(bNode *editorNode);

View File

@ -27,9 +27,9 @@
#include "COM_SeparateRGBANode.h" #include "COM_SeparateRGBANode.h"
/** /**
* @brief SeparateYUVANode * @brief SeparateYUVANode
* @ingroup Node * @ingroup Node
*/ */
class SeparateYUVANode : public SeparateRGBANode { class SeparateYUVANode : public SeparateRGBANode {
public: public:
SeparateYUVANode(bNode *editorNode); SeparateYUVANode(bNode *editorNode);

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief SetAlphaNode * @brief SetAlphaNode
* @ingroup Node * @ingroup Node
*/ */
class SetAlphaNode: public Node { class SetAlphaNode : public Node {
public: public:
SetAlphaNode(bNode *editorNode) :Node(editorNode) {} SetAlphaNode(bNode *editorNode) : Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief SocketProxyNode * @brief SocketProxyNode
* @ingroup Node * @ingroup Node
*/ */
class SocketProxyNode: public Node { class SocketProxyNode : public Node {
public: public:
SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput); SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
virtual bool isProxyNode() const { return true; } virtual bool isProxyNode() const { return true; }
}; };

View File

@ -26,12 +26,12 @@
#include "COM_Node.h" #include "COM_Node.h"
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief SplitViewerNode * @brief SplitViewerNode
* @ingroup Node * @ingroup Node
*/ */
class SplitViewerNode : public Node { class SplitViewerNode : public Node {
public: public:
SplitViewerNode(bNode *editorNode); SplitViewerNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -24,11 +24,11 @@
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief Stabilize2dNode * @brief Stabilize2dNode
* @ingroup Node * @ingroup Node
*/ */
class Stabilize2dNode : public Node { class Stabilize2dNode : public Node {
public: public:
Stabilize2dNode(bNode *editorNode); Stabilize2dNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };

View File

@ -27,12 +27,12 @@
#include "COM_NodeOperation.h" #include "COM_NodeOperation.h"
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief SwitchNode * @brief SwitchNode
* @ingroup Node * @ingroup Node
*/ */
class SwitchNode : public Node { class SwitchNode : public Node {
public: public:
SwitchNode(bNode *editorNode); SwitchNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -24,11 +24,11 @@
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief TextureNode * @brief TextureNode
* @ingroup Node * @ingroup Node
*/ */
class TextureNode : public Node { class TextureNode : public Node {
public: public:
TextureNode(bNode *editorNode); TextureNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief TimeNode * @brief TimeNode
* @ingroup Node * @ingroup Node
*/ */
class TimeNode: public Node { class TimeNode : public Node {
public: public:
TimeNode(bNode *editorNode); TimeNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief TonemapNode * @brief TonemapNode
* @ingroup Node * @ingroup Node
*/ */
class TonemapNode: public Node { class TonemapNode : public Node {
public: public:
TonemapNode(bNode *editorNode); TonemapNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -24,11 +24,11 @@
#include "DNA_node_types.h" #include "DNA_node_types.h"
/** /**
* @brief TransformNode * @brief TransformNode
* @ingroup Node * @ingroup Node
*/ */
class TransformNode : public Node { class TransformNode : public Node {
public: public:
TransformNode(bNode *editorNode); TransformNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief TranslateNode * @brief TranslateNode
* @ingroup Node * @ingroup Node
*/ */
class TranslateNode: public Node { class TranslateNode : public Node {
public: public:
TranslateNode(bNode *editorNode); TranslateNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief ValueNode * @brief ValueNode
* @ingroup Node * @ingroup Node
*/ */
class ValueNode: public Node { class ValueNode : public Node {
public: public:
ValueNode(bNode *editorNode); ValueNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief VectorBlurNode * @brief VectorBlurNode
* @ingroup Node * @ingroup Node
*/ */
class VectorBlurNode: public Node { class VectorBlurNode : public Node {
public: public:
VectorBlurNode(bNode *editorNode); VectorBlurNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h" #include "COM_Node.h"
/** /**
* @brief VectorCurveNode * @brief VectorCurveNode
* @ingroup Node * @ingroup Node
*/ */
class VectorCurveNode: public Node { class VectorCurveNode : public Node {
public: public:
VectorCurveNode(bNode *editorNode); VectorCurveNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context); void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
}; };
#endif #endif

Some files were not shown because too many files have changed in this diff Show More