Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2012-06-14 13:41:41 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-06-14 13:41:41 +0400
commit8ebec02df6e58fe02bd33c236601a3209f9818cd (patch)
tree2456049baf76cfbf707ec151d8a5f8c180164ef8 /source
parentee65cd7685f3a2334bf47dbfeff5f0d576e082fd (diff)
Removed the actual data type concept as it was never used.
Diffstat (limited to 'source')
-rw-r--r--source/blender/compositor/COM_defines.h6
-rw-r--r--source/blender/compositor/intern/COM_Converter.cpp4
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.cpp26
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp15
-rw-r--r--source/blender/compositor/intern/COM_InputSocket.cpp78
-rw-r--r--source/blender/compositor/intern/COM_InputSocket.h15
-rw-r--r--source/blender/compositor/intern/COM_NodeBase.cpp52
-rw-r--r--source/blender/compositor/intern/COM_NodeBase.h28
-rw-r--r--source/blender/compositor/intern/COM_OutputSocket.cpp57
-rw-r--r--source/blender/compositor/intern/COM_OutputSocket.h24
-rw-r--r--source/blender/compositor/intern/COM_Socket.cpp7
-rw-r--r--source/blender/compositor/intern/COM_Socket.h22
-rw-r--r--source/blender/compositor/nodes/COM_MuteNode.cpp3
-rw-r--r--source/blender/compositor/nodes/COM_OutputFileNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_SocketProxyNode.cpp7
-rw-r--r--source/blender/compositor/nodes/COM_SwitchNode.cpp2
-rw-r--r--source/blender/compositor/operations/COM_SocketProxyOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_SocketProxyOperation.h2
18 files changed, 20 insertions, 336 deletions
diff --git a/source/blender/compositor/COM_defines.h b/source/blender/compositor/COM_defines.h
index d072b4ca727..42015035f73 100644
--- a/source/blender/compositor/COM_defines.h
+++ b/source/blender/compositor/COM_defines.h
@@ -28,8 +28,6 @@
* @ingroup Model
*/
typedef enum DataType {
- /** @brief Unknown data type (or not yet known) */
- COM_DT_UNKNOWN = 0,
/** @brief Value data type */
COM_DT_VALUE = 1,
/** @brief Vector data type */
@@ -69,8 +67,8 @@ typedef enum CompositorPriority {
// chunk size determination
#define COM_PREVIEW_SIZE 140.0f
-//#define COM_OPENCL_ENABLED
-//#define COM_DEBUG
+#define COM_OPENCL_ENABLED
+#define COM_DEBUG
// workscheduler threading models
/**
diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp
index dc6409e7b86..f4bb89969ff 100644
--- a/source/blender/compositor/intern/COM_Converter.cpp
+++ b/source/blender/compositor/intern/COM_Converter.cpp
@@ -362,8 +362,8 @@ void Converter::convertDataType(SocketConnection *connection, ExecutionSystem *s
{
OutputSocket *outputSocket = connection->getFromSocket();
InputSocket *inputSocket = connection->getToSocket();
- DataType fromDatatype = outputSocket->getActualDataType();
- DataType toDatatype = inputSocket->getActualDataType();
+ DataType fromDatatype = outputSocket->getDataType();
+ DataType toDatatype = inputSocket->getDataType();
NodeOperation * converter = NULL;
if (fromDatatype == COM_DT_VALUE && toDatatype == COM_DT_COLOR) {
converter = new ConvertValueToColourProg();
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index 9681996c74d..b84e9d0d3f7 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -229,19 +229,15 @@ void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation)
void ExecutionSystem::convertToOperations()
{
unsigned int index;
- // first determine data types of the nodes, this can be used by the node to convert to a different operation system
- this->determineActualSocketDataTypes((vector<NodeBase*>&)this->nodes);
for (index = 0; index < this->nodes.size(); index++) {
Node *node = (Node*)this->nodes[index];
node->convertToOperations(this, &this->context);
}
- // update the socket types of the operations. this will be used to add conversion operations in the system
- this->determineActualSocketDataTypes((vector<NodeBase*>&)this->operations);
for (index = 0 ; index < this->connections.size(); index ++) {
SocketConnection *connection = this->connections[index];
if (connection->isValid()) {
- if (connection->getFromSocket()->getActualDataType() != connection->getToSocket()->getActualDataType()) {
+ if (connection->getFromSocket()->getDataType() != connection->getToSocket()->getDataType()) {
Converter::convertDataType(connection, this);
}
}
@@ -307,26 +303,6 @@ void ExecutionSystem::addSocketConnection(SocketConnection *connection)
}
-void ExecutionSystem::determineActualSocketDataTypes(vector<NodeBase*> &nodes)
-{
- unsigned int index;
- /* first do all input nodes */
- for (index = 0; index < nodes.size(); index++) {
- NodeBase *node = nodes[index];
- if (node->isInputNode()) {
- node->determineActualSocketDataTypes();
- }
- }
-
- /* then all other nodes */
- for (index = 0; index < nodes.size(); index++) {
- NodeBase *node = nodes[index];
- if (!node->isInputNode()) {
- node->determineActualSocketDataTypes();
- }
- }
-}
-
void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup*> *result, CompositorPriority priority) const
{
unsigned int index;
diff --git a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
index d5ca2ec619a..2d889e269e0 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
@@ -218,7 +218,7 @@ void ExecutionSystemHelper::debugDump(ExecutionSystem *system)
printf("|");
}
printf("<IN_%p>", socket);
- switch (socket->getActualDataType()) {
+ switch (socket->getDataType()) {
case COM_DT_VALUE:
printf("Value");
break;
@@ -228,9 +228,6 @@ void ExecutionSystemHelper::debugDump(ExecutionSystem *system)
case COM_DT_COLOR:
printf("Color");
break;
- case COM_DT_UNKNOWN:
- printf("Unknown");
- break;
}
}
printf("}");
@@ -270,7 +267,7 @@ void ExecutionSystemHelper::debugDump(ExecutionSystem *system)
printf("|");
}
printf("<OUT_%p>", socket);
- switch (socket->getActualDataType()) {
+ switch (socket->getDataType()) {
case COM_DT_VALUE:
printf("Value");
break;
@@ -280,9 +277,6 @@ void ExecutionSystemHelper::debugDump(ExecutionSystem *system)
case COM_DT_COLOR:
printf("Color");
break;
- case COM_DT_UNKNOWN:
- printf("Unknown");
- break;
}
}
printf("}");
@@ -317,7 +311,7 @@ void ExecutionSystemHelper::debugDump(ExecutionSystem *system)
printf(" [color=red]");
}
else {
- switch (connection->getFromSocket()->getActualDataType()) {
+ switch (connection->getFromSocket()->getDataType()) {
case COM_DT_VALUE:
printf(" [color=grey]");
break;
@@ -327,9 +321,6 @@ void ExecutionSystemHelper::debugDump(ExecutionSystem *system)
case COM_DT_COLOR:
printf(" [color=orange]");
break;
- case COM_DT_UNKNOWN:
- printf(" [color=black]");
- break;
}
}
printf("\r\n");
diff --git a/source/blender/compositor/intern/COM_InputSocket.cpp b/source/blender/compositor/intern/COM_InputSocket.cpp
index 4d96d077901..c9705ad69fb 100644
--- a/source/blender/compositor/intern/COM_InputSocket.cpp
+++ b/source/blender/compositor/intern/COM_InputSocket.cpp
@@ -64,68 +64,6 @@ void InputSocket::determineResolution(unsigned int resolution[],unsigned int pre
}
}
-DataType InputSocket::convertToSupportedDataType(DataType datatype)
-{
- int supportedDataTypes = getDataType();
- if (supportedDataTypes&datatype) {
- return datatype;
- }
- bool candoValue = supportedDataTypes&COM_DT_VALUE;
- bool candoVector = supportedDataTypes&COM_DT_VECTOR;
- bool candoColor = supportedDataTypes&COM_DT_COLOR;
-
- if (datatype == COM_DT_VALUE) {
- if (candoColor) {
- return COM_DT_COLOR;
- }
- else if (candoVector) {
- return COM_DT_VECTOR;
- }
- }
- else if (datatype == COM_DT_VECTOR) {
- if (candoColor) {
- return COM_DT_COLOR;
- }
- else if (candoValue) {
- return COM_DT_VALUE;
- }
- }
- else if (datatype == COM_DT_COLOR) {
- if (candoVector) {
- return COM_DT_VECTOR;
- }
- else if (candoValue) {
- return COM_DT_VALUE;
- }
- }
- return this->getDataType();
-}
-
-void InputSocket::determineActualDataType()
-{
- /// @note: this method is only called for inputsocket that are not connected.
- /// @note: passes COM_DT_COLOR, the convertToSupportedDataType converts this to a capable DataType
- this->setActualDataType(this->convertToSupportedDataType(COM_DT_COLOR));
- #if 0 // XXX TODO check for proxy node and use output data type?
- if (this->getGroupOutputSocket()) {
- if (!this->isInsideOfGroupNode()) {
- this->getGroupOutputSocket()->determineActualDataType();
- }
- }
- #endif
-}
-
-void InputSocket::notifyActualInputType(DataType datatype)
-{
- DataType supportedDataType = convertToSupportedDataType(datatype);
- this->setActualDataType(supportedDataType);
- this->fireActualDataTypeSet();
-}
-
-void InputSocket::fireActualDataTypeSet()
-{
- this->getNode()->notifyActualDataTypeSet(this, this->getActualDataType());
-}
void InputSocket::relinkConnections(InputSocket *relinkToSocket)
{
if (!isConnected()) {
@@ -141,8 +79,7 @@ void InputSocket::relinkConnectionsDuplicate(InputSocket *relinkToSocket, int ed
{
if (!this->isConnected()) {
Node *node = (Node*)this->getNode();
- switch (this->getActualDataType()) {
- case COM_DT_UNKNOWN:
+ switch (this->getDataType()) {
case COM_DT_COLOR:
node->addSetColorOperation(graph, relinkToSocket, editorNodeInputSocketIndex);
break;
@@ -171,8 +108,7 @@ void InputSocket::relinkConnections(InputSocket *relinkToSocket, int editorNode
}
else {
Node *node = (Node*)this->getNode();
- switch (this->getActualDataType()) {
- case COM_DT_UNKNOWN:
+ switch (this->getDataType()) {
case COM_DT_COLOR:
node->addSetColorOperation(graph, relinkToSocket, editorNodeInputSocketIndex);
break;
@@ -186,16 +122,6 @@ void InputSocket::relinkConnections(InputSocket *relinkToSocket, int editorNode
}
}
-const ChannelInfo *InputSocket::getChannelInfo(const int channelnumber)
-{
- if (this->isConnected() && this->connection->getFromSocket()) {
- return this->connection->getFromSocket()->getChannelInfo(channelnumber);
- }
- else {
- return NULL;
- }
-}
-
bool InputSocket::isStatic()
{
if (isConnected()) {
diff --git a/source/blender/compositor/intern/COM_InputSocket.h b/source/blender/compositor/intern/COM_InputSocket.h
index 6ac6ad09126..c066b5d8303 100644
--- a/source/blender/compositor/intern/COM_InputSocket.h
+++ b/source/blender/compositor/intern/COM_InputSocket.h
@@ -73,19 +73,6 @@ private:
InputSocketResizeMode resizeMode;
- /**
- * @brief convert a data type to a by the socket supported data type.
- *
- * @param datatype the datatype that needs to be checked
- * @section data-conversion
- */
- DataType convertToSupportedDataType(DataType datatype);
-
- /**
- * @brief called when the ActualDataType is set. notifies other parties
- */
- void fireActualDataTypeSet();
-
public:
InputSocket(DataType datatype);
InputSocket(DataType datatype, InputSocketResizeMode resizeMode);
@@ -104,8 +91,6 @@ public:
*/
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
- void determineActualDataType();
-
/**
* @brief Notifies the Input of the data type (via a SocketConnection)
* @param datatype the datatype to evaluate
diff --git a/source/blender/compositor/intern/COM_NodeBase.cpp b/source/blender/compositor/intern/COM_NodeBase.cpp
index 17a623c9c81..5ffe9bdd26a 100644
--- a/source/blender/compositor/intern/COM_NodeBase.cpp
+++ b/source/blender/compositor/intern/COM_NodeBase.cpp
@@ -89,55 +89,3 @@ InputSocket *NodeBase::getInputSocket(int index)
{
return this->inputsockets[index];
}
-
-
-void NodeBase::determineActualSocketDataTypes()
-{
- unsigned int index;
- for (index = 0 ; index < this->outputsockets.size() ; index ++) {
- OutputSocket *socket = this->outputsockets[index];
- if (socket->getActualDataType() ==COM_DT_UNKNOWN && socket->isConnected()) {
- socket->determineActualDataType();
- }
- }
- for (index = 0 ; index < this->inputsockets.size() ; index ++) {
- InputSocket *socket = this->inputsockets[index];
- if (socket->getActualDataType() ==COM_DT_UNKNOWN) {
- socket->determineActualDataType();
- }
- }
-}
-
-DataType NodeBase::determineActualDataType(OutputSocket *outputsocket)
-{
- const int inputIndex = outputsocket->getInputSocketDataTypeDeterminatorIndex();
- if (inputIndex != -1) {
- return this->getInputSocket(inputIndex)->getActualDataType();
- }
- else {
- return outputsocket->getDataType();
- }
-}
-
-void NodeBase::notifyActualDataTypeSet(InputSocket *socket, DataType actualType)
-{
- unsigned int index;
- int socketIndex = -1;
- for (index = 0 ; index < this->inputsockets.size() ; index ++) {
- if (this->inputsockets[index] == socket) {
- socketIndex = (int)index;
- break;
- }
- }
- if (socketIndex == -1) return;
-
- for (index = 0 ; index < this->outputsockets.size() ; index ++) {
- OutputSocket *socket = this->outputsockets[index];
- if (socket->isActualDataTypeDeterminedByInputSocket() &&
- socket->getInputSocketDataTypeDeterminatorIndex() == socketIndex)
- {
- socket->setActualDataType(actualType);
- socket->fireActualDataType();
- }
- }
-}
diff --git a/source/blender/compositor/intern/COM_NodeBase.h b/source/blender/compositor/intern/COM_NodeBase.h
index 3917904afe3..5e3a4fa5531 100644
--- a/source/blender/compositor/intern/COM_NodeBase.h
+++ b/source/blender/compositor/intern/COM_NodeBase.h
@@ -74,24 +74,6 @@ public:
virtual ~NodeBase();
/**
- * @brief determine the actual socket data types that will go through the system
- */
- virtual void determineActualSocketDataTypes();
-
- /**
- * @brief determine the actual socket data types of a specific outputsocket
- *
- * @param outputsocket
- * a reference to the actual outputsocket where the datatype must be determined from
- *
- * @return
- * COM_DT_VALUE if it is a value (1 float buffer)
- * COM_DT_COLOR if it is a value (4 float buffer)
- * COM_DT_VECTOR if it is a value (3 float buffer)
- */
- virtual DataType determineActualDataType(OutputSocket *outputsocket);
-
- /**
* @brief is this node an operation?
* This is true when the instance is of the subclass NodeOperation.
* @return [true:false]
@@ -117,16 +99,6 @@ public:
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
- * node that contains the inputsocket.
- * @param socket
- * the reference of the inputsocket where connected data type is found
- * @param actualType [COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR]
- * the actual data type that is coming from the connected output socket
- */
- virtual void notifyActualDataTypeSet(InputSocket *socket, const DataType actualType);
-
- /**
* get the reference to a certain outputsocket
* @param index
* the index of the needed outputsocket
diff --git a/source/blender/compositor/intern/COM_OutputSocket.cpp b/source/blender/compositor/intern/COM_OutputSocket.cpp
index 708b2d65d46..77bad3c006f 100644
--- a/source/blender/compositor/intern/COM_OutputSocket.cpp
+++ b/source/blender/compositor/intern/COM_OutputSocket.cpp
@@ -27,16 +27,6 @@
OutputSocket::OutputSocket(DataType datatype) :Socket(datatype)
{
- this->inputSocketDataTypeDeterminatorIndex = -1;
-}
-OutputSocket::OutputSocket(DataType datatype, int inputSocketDataTypeDeterminatorIndex) :Socket(datatype)
-{
- this->inputSocketDataTypeDeterminatorIndex = inputSocketDataTypeDeterminatorIndex;
-}
-
-OutputSocket::OutputSocket(OutputSocket *from): Socket(from->getDataType())
-{
- this->inputSocketDataTypeDeterminatorIndex = from->getInputSocketDataTypeDeterminatorIndex();
}
int OutputSocket::isOutputSocket() const { return true; }
@@ -57,51 +47,11 @@ void OutputSocket::determineResolution(unsigned int resolution[], unsigned int p
}
}
-void OutputSocket::determineActualDataType()
-{
- DataType actualDatatype = this->getNode()->determineActualDataType(this);
-
- /** @todo: set the channel info needs to be moved after integration with OCIO */
- this->channelinfo[0].setNumber(0);
- this->channelinfo[1].setNumber(1);
- this->channelinfo[2].setNumber(2);
- this->channelinfo[3].setNumber(3);
- switch (actualDatatype) {
- case COM_DT_VALUE:
- this->channelinfo[0].setType(COM_CT_Value);
- break;
- case COM_DT_VECTOR:
- this->channelinfo[0].setType(COM_CT_X);
- this->channelinfo[1].setType(COM_CT_Y);
- this->channelinfo[2].setType(COM_CT_Z);
- break;
- case COM_DT_COLOR:
- this->channelinfo[0].setType(COM_CT_ColorComponent);
- this->channelinfo[1].setType(COM_CT_ColorComponent);
- this->channelinfo[2].setType(COM_CT_ColorComponent);
- this->channelinfo[3].setType(COM_CT_Alpha);
- break;
- default:
- break;
- }
-
- this->setActualDataType(actualDatatype);
- this->fireActualDataType();
-}
-
void OutputSocket::addConnection(SocketConnection *connection)
{
this->connections.push_back(connection);
}
-void OutputSocket::fireActualDataType()
-{
- unsigned int index;
- for (index = 0 ; index < this->connections.size();index ++) {
- SocketConnection *connection = this->connections[index];
- connection->getToSocket()->notifyActualInputType(this->getActualDataType());
- }
-}
void OutputSocket::relinkConnections(OutputSocket *relinkToSocket, bool single)
{
if (isConnected()) {
@@ -109,7 +59,6 @@ void OutputSocket::relinkConnections(OutputSocket *relinkToSocket, bool single)
SocketConnection *connection = this->connections[0];
connection->setFromSocket(relinkToSocket);
relinkToSocket->addConnection(connection);
-// relinkToSocket->setActualDataType(this->getActualDataType());
this->connections.erase(this->connections.begin());
}
else {
@@ -119,7 +68,6 @@ void OutputSocket::relinkConnections(OutputSocket *relinkToSocket, bool single)
connection->setFromSocket(relinkToSocket);
relinkToSocket->addConnection(connection);
}
-// relinkToSocket->setActualDataType(this->getActualDataType());
this->connections.clear();
}
}
@@ -157,8 +105,3 @@ WriteBufferOperation *OutputSocket::findAttachedWriteBufferOperation() const
return NULL;
}
-ChannelInfo *OutputSocket::getChannelInfo(const int channelnumber)
-{
- return &this->channelinfo[channelnumber];
-}
-
diff --git a/source/blender/compositor/intern/COM_OutputSocket.h b/source/blender/compositor/intern/COM_OutputSocket.h
index e008d651046..c073703c423 100644
--- a/source/blender/compositor/intern/COM_OutputSocket.h
+++ b/source/blender/compositor/intern/COM_OutputSocket.h
@@ -43,15 +43,7 @@ class WriteBufferOperation;
class OutputSocket : public Socket {
private:
vector<SocketConnection *> connections;
-
- /**
- * @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
- * default datatype.
- */
- int inputSocketDataTypeDeterminatorIndex;
-
- ChannelInfo channelinfo[4];
+
void removeFirstConnection();
public:
OutputSocket(DataType datatype);
@@ -72,18 +64,10 @@ public:
/**
* @brief determine the actual data type and channel info.
*/
- void determineActualDataType();
void relinkConnections(OutputSocket *relinkToSocket) { this->relinkConnections(relinkToSocket, false); };
void relinkConnections(OutputSocket *relinkToSocket, bool single);
- bool isActualDataTypeDeterminedByInputSocket() {
- return this->inputSocketDataTypeDeterminatorIndex > -1;
- }
const int getNumberOfConnections() { return connections.size(); }
- /**
- * @brief get the index of the inputsocket that determines the datatype of this outputsocket
- */
- int getInputSocketDataTypeDeterminatorIndex() { return this->inputSocketDataTypeDeterminatorIndex; }
void clearConnections();
/**
@@ -93,12 +77,6 @@ public:
WriteBufferOperation *findAttachedWriteBufferOperation() const;
ChannelInfo *getChannelInfo(const int channelnumber);
- /**
- * @brief trigger determine actual data type to all connected sockets
- * @note will only be triggered just after the actual data type is set.
- */
- void fireActualDataType();
-
private:
};
diff --git a/source/blender/compositor/intern/COM_Socket.cpp b/source/blender/compositor/intern/COM_Socket.cpp
index a5336ac1202..af9ad1967a5 100644
--- a/source/blender/compositor/intern/COM_Socket.cpp
+++ b/source/blender/compositor/intern/COM_Socket.cpp
@@ -27,7 +27,6 @@
Socket::Socket(DataType datatype)
{
this->datatype = datatype;
- this->actualType = COM_DT_UNKNOWN;
this->editorSocket = NULL;
this->node = NULL;
}
@@ -42,9 +41,3 @@ int Socket::isOutputSocket() const { return false; }
const int Socket::isConnected() const {return false;}
void Socket::setNode(NodeBase *node) {this->node = node;}
NodeBase *Socket::getNode() const {return this->node;}
-
-DataType Socket::getActualDataType() const {return this->actualType;}
-void Socket::setActualDataType(DataType actualType)
-{
- this->actualType = actualType;
-}
diff --git a/source/blender/compositor/intern/COM_Socket.h b/source/blender/compositor/intern/COM_Socket.h
index 0be21a6b1b8..7c5c2198a16 100644
--- a/source/blender/compositor/intern/COM_Socket.h
+++ b/source/blender/compositor/intern/COM_Socket.h
@@ -57,12 +57,6 @@ private:
*/
DataType datatype;
- /**
- * 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
- */
- DataType actualType;
-
bNodeSocket *editorSocket;
public:
Socket(DataType datatype);
@@ -71,25 +65,11 @@ public:
void setNode(NodeBase *node);
NodeBase *getNode() const;
- /**
- * @brief get the actual data type
- *
- * @note The actual data type can differ from the data type this socket expects.
- * @return actual DataType
- */
- DataType getActualDataType() const;
-
- /**
- * @brief set the actual data type
- * @param actualType the new actual type
- */
- void setActualDataType(DataType actualType);
-
+
const virtual int isConnected() const;
int isInputSocket() const;
int isOutputSocket() const;
virtual void determineResolution(int resolution[], unsigned int preferredResolution[]) {}
- virtual void determineActualDataType() {}
void setEditorSocket(bNodeSocket *editorSocket) { this->editorSocket = editorSocket; }
bNodeSocket *getbNodeSocket() const { return this->editorSocket; }
diff --git a/source/blender/compositor/nodes/COM_MuteNode.cpp b/source/blender/compositor/nodes/COM_MuteNode.cpp
index 93e352cfede..57b7871318b 100644
--- a/source/blender/compositor/nodes/COM_MuteNode.cpp
+++ b/source/blender/compositor/nodes/COM_MuteNode.cpp
@@ -72,9 +72,6 @@ void MuteNode::reconnect(ExecutionSystem * graph, OutputSocket * output)
operation = coloroperation;
break;
}
- /* quiet warnings */
- case COM_DT_UNKNOWN:
- break;
}
if (operation) {
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.cpp b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
index ca18ea5fbf7..e5deb595d78 100644
--- a/source/blender/compositor/nodes/COM_OutputFileNode.cpp
+++ b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
@@ -77,7 +77,7 @@ void OutputFileNode::convertToOperations(ExecutionSystem *graph, CompositorConte
BLI_join_dirfile(path, FILE_MAX, storage->base_path, sockdata->path);
OutputSingleLayerOperation *outputOperation = new OutputSingleLayerOperation(
- context->getScene(), context->getbNodeTree(), input->getActualDataType(), format, path);
+ context->getScene(), context->getbNodeTree(), input->getDataType(), format, path);
input->relinkConnections(outputOperation->getInputSocket(0));
graph->addOperation(outputOperation);
if (!previewAdded) {
diff --git a/source/blender/compositor/nodes/COM_SocketProxyNode.cpp b/source/blender/compositor/nodes/COM_SocketProxyNode.cpp
index fbb25afe266..cdb844cad54 100644
--- a/source/blender/compositor/nodes/COM_SocketProxyNode.cpp
+++ b/source/blender/compositor/nodes/COM_SocketProxyNode.cpp
@@ -49,14 +49,14 @@ void SocketProxyNode::convertToOperations(ExecutionSystem *graph, CompositorCont
InputSocket * inputsocket = this->getInputSocket(0);
if (outputsocket->isConnected()) {
if (inputsocket->isConnected()) {
- SocketProxyOperation *operation = new SocketProxyOperation();
+ SocketProxyOperation *operation = new SocketProxyOperation(this->getOutputSocket()->getDataType());
inputsocket->relinkConnections(operation->getInputSocket(0));
outputsocket->relinkConnections(operation->getOutputSocket(0));
graph->addOperation(operation);
}
else {
/* If input is not connected, add a constant value operation instead */
- switch (outputsocket->getActualDataType()) {
+ switch (outputsocket->getDataType()) {
case COM_DT_VALUE:
{
SetValueOperation *operation = new SetValueOperation();
@@ -84,9 +84,6 @@ void SocketProxyNode::convertToOperations(ExecutionSystem *graph, CompositorCont
graph->addOperation(operation);
break;
}
- /* quiet warnings */
- case COM_DT_UNKNOWN:
- break;
}
}
}
diff --git a/source/blender/compositor/nodes/COM_SwitchNode.cpp b/source/blender/compositor/nodes/COM_SwitchNode.cpp
index 58c60a96de8..bb1a9c119f8 100644
--- a/source/blender/compositor/nodes/COM_SwitchNode.cpp
+++ b/source/blender/compositor/nodes/COM_SwitchNode.cpp
@@ -31,7 +31,7 @@ SwitchNode::SwitchNode(bNode *editorNode): Node(editorNode)
void SwitchNode::convertToOperations(ExecutionSystem *graph, CompositorContext * context)
{
- SocketProxyOperation * operation = new SocketProxyOperation();
+ SocketProxyOperation * operation = new SocketProxyOperation(COM_DT_COLOR);
int switchFrame = this->getbNode()->custom1;
if (!switchFrame) {
diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
index 51b16506dd9..5f86d6bd7c7 100644
--- a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
+++ b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
@@ -22,10 +22,10 @@
#include "COM_SocketProxyOperation.h"
-SocketProxyOperation::SocketProxyOperation() : NodeOperation()
+SocketProxyOperation::SocketProxyOperation(DataType type) : NodeOperation()
{
- this->addInputSocket(COM_DT_COLOR/*|COM_DT_VECTOR|COM_DT_VALUE*/);
- this->addOutputSocket(COM_DT_COLOR);
+ this->addInputSocket(type);
+ this->addOutputSocket(type);
this->inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.h b/source/blender/compositor/operations/COM_SocketProxyOperation.h
index 701a5a8f693..5dc8f3d6f8f 100644
--- a/source/blender/compositor/operations/COM_SocketProxyOperation.h
+++ b/source/blender/compositor/operations/COM_SocketProxyOperation.h
@@ -29,7 +29,7 @@ class SocketProxyOperation : public NodeOperation {
private:
SocketReader *inputOperation;
public:
- SocketProxyOperation();
+ SocketProxyOperation(DataType type);
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void initExecution();