Muting node patch: second part. Also fix [#27636] Muting shading nodes is ignored
Now, compositing, shading and texture nodes have a consistent muting system, with default behaving as previous (for compo), and which can be optionaly customized by each node. Shader nodes are also GLSL muted. However, Cycles is currently unaware of muted nodes, will try to address this…
This commit is contained in:
@@ -54,6 +54,8 @@
|
||||
|
||||
#include "gpu_codegen.h"
|
||||
|
||||
#include "node_util.h" /* For muting node stuff... */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
@@ -1212,6 +1214,31 @@ int GPU_stack_link(GPUMaterial *mat, const char *name, GPUNodeStack *in, GPUNode
|
||||
return 1;
|
||||
}
|
||||
|
||||
int GPU_stack_link_mute(GPUMaterial *mat, const char *name, LinkInOutsMuteNode *mlnk)
|
||||
{
|
||||
GPUNode *node;
|
||||
GPUFunction *function;
|
||||
int i;
|
||||
|
||||
function = GPU_lookup_function(name);
|
||||
if(!function) {
|
||||
fprintf(stderr, "GPU failed to find function %s\n", name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for(i = 0; i < mlnk->num_outs; i++) {
|
||||
node = GPU_node_begin(name);
|
||||
gpu_node_input_socket(node, (GPUNodeStack*)mlnk->in);
|
||||
GPU_node_output(node, ((GPUNodeStack*)mlnk->outs+i)->type, ((GPUNodeStack*)mlnk->outs+i)->name,
|
||||
&((GPUNodeStack*)mlnk->outs+i)->link);
|
||||
GPU_node_end(node);
|
||||
|
||||
gpu_material_add_node(mat, node);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int GPU_link_changed(GPUNodeLink *link)
|
||||
{
|
||||
GPUNode *node;
|
||||
|
||||
Reference in New Issue
Block a user