Added option for group node buffering in the compositor.
Justa cluster did not have enough memory to handle all Mango 4k scenes. Option is default disabled and can be enabled in the performance panel. - At Mind -
This commit is contained in:
@@ -252,6 +252,7 @@ class NODE_PT_quality(bpy.types.Panel):
|
||||
|
||||
col = layout.column()
|
||||
col.prop(tree, "use_opencl")
|
||||
col.prop(tree, "use_groupnode_buffer")
|
||||
col.prop(tree, "two_pass")
|
||||
col.prop(snode, "show_highlight")
|
||||
col.prop(snode, "use_hidden_preview")
|
||||
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
* @brief does this system have active opencl devices?
|
||||
*/
|
||||
bool m_hasActiveOpenCLDevices;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Skip slow nodes
|
||||
*/
|
||||
@@ -178,6 +178,7 @@ public:
|
||||
|
||||
void setFastCalculation(bool fastCalculation) {this->m_fastCalculation = fastCalculation;}
|
||||
bool isFastCalculation() {return this->m_fastCalculation;}
|
||||
inline bool isGroupnodeBufferEnabled() {return this->getbNodeTree()->flag & NTREE_COM_GROUPNODE_BUFFER;}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -64,11 +64,12 @@ void GroupNode::ungroup(ExecutionSystem &system)
|
||||
}
|
||||
}
|
||||
|
||||
const bool groupnodeBuffering = system.getContext().isGroupnodeBufferEnabled();
|
||||
for (index = 0; index < outputsockets.size(); index++) {
|
||||
OutputSocket *outputSocket = outputsockets[index];
|
||||
bNodeSocket *editorOutput = outputSocket->getbNodeSocket();
|
||||
if (editorOutput->groupsock) {
|
||||
SocketProxyNode *proxy = new SocketProxyNode(bnode, editorOutput->groupsock, editorOutput, true);
|
||||
SocketProxyNode *proxy = new SocketProxyNode(bnode, editorOutput->groupsock, editorOutput, groupnodeBuffering);
|
||||
outputSocket->relinkConnections(proxy->getOutputSocket(0));
|
||||
ExecutionSystemHelper::addNode(system.getNodes(), proxy);
|
||||
}
|
||||
|
||||
@@ -309,9 +309,11 @@ typedef struct bNodeTree {
|
||||
#define NTREE_TYPE_INIT 1
|
||||
|
||||
/* ntree->flag */
|
||||
#define NTREE_DS_EXPAND 1 /* for animation editors */
|
||||
#define NTREE_COM_OPENCL 2 /* use opencl */
|
||||
#define NTREE_TWO_PASS 4 /* two pass */
|
||||
#define NTREE_DS_EXPAND 1 /* for animation editors */
|
||||
#define NTREE_COM_OPENCL 2 /* use opencl */
|
||||
#define NTREE_TWO_PASS 4 /* two pass */
|
||||
#define NTREE_COM_GROUPNODE_BUFFER 8 /* use groupnode buffers */
|
||||
|
||||
/* XXX not nice, but needed as a temporary flags
|
||||
* for group updates after library linking.
|
||||
*/
|
||||
|
||||
@@ -4971,6 +4971,10 @@ static void rna_def_composite_nodetree(BlenderRNA *brna)
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", NTREE_COM_OPENCL);
|
||||
RNA_def_property_ui_text(prop, "OpenCL", "Enable GPU calculations");
|
||||
|
||||
prop = RNA_def_property(srna, "use_groupnode_buffer", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", NTREE_COM_GROUPNODE_BUFFER);
|
||||
RNA_def_property_ui_text(prop, "Buffer Groups", "Enable buffering of group nodes");
|
||||
|
||||
prop = RNA_def_property(srna, "two_pass", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", NTREE_TWO_PASS);
|
||||
RNA_def_property_ui_text(prop, "Two Pass", "Use two pass execution during editing: first calculate fast nodes, "
|
||||
|
||||
Reference in New Issue
Block a user