[Bf-blender-cvs] [c86d70ca3d7] cycles_procedural_api: include render/shader instead of overloading Node::set
Kévin Dietrich
noreply at git.blender.org
Tue Sep 22 14:14:46 CEST 2020
Commit: c86d70ca3d75b1067ccf84c6115de6f9814c868b
Author: Kévin Dietrich
Date: Mon Sep 21 13:13:39 2020 +0200
Branches: cycles_procedural_api
https://developer.blender.org/rBc86d70ca3d75b1067ccf84c6115de6f9814c868b
include render/shader instead of overloading Node::set
===================================================================
M intern/cycles/graph/node.cpp
M intern/cycles/graph/node.h
M intern/cycles/render/light.h
===================================================================
diff --git a/intern/cycles/graph/node.cpp b/intern/cycles/graph/node.cpp
index be4186e1522..18cc8af3f6c 100644
--- a/intern/cycles/graph/node.cpp
+++ b/intern/cycles/graph/node.cpp
@@ -140,14 +140,6 @@ void Node::set(const SocketType &input, Node *value)
set_if_different(input, value);
}
-// todo(kevin) : Light::set_shader does not select the overload taking Node* but the one with
-// taking bool
-void Node::set(const SocketType &input, Shader *value)
-{
- assert(input.type == SocketType::NODE);
- set_if_different(input, value);
-}
-
/* set array values */
void Node::set(const SocketType &input, array<bool> &value)
{
diff --git a/intern/cycles/graph/node.h b/intern/cycles/graph/node.h
index 8ac52791c4a..4f4a7291082 100644
--- a/intern/cycles/graph/node.h
+++ b/intern/cycles/graph/node.h
@@ -101,7 +101,6 @@ struct Node {
void set(const SocketType &input, ustring value);
void set(const SocketType &input, const Transform &value);
void set(const SocketType &input, Node *value);
- void set(const SocketType &input, Shader *value);
/* set array values. the memory from the input array will taken over
* by the node and the input array will be empty after return */
diff --git a/intern/cycles/render/light.h b/intern/cycles/render/light.h
index 4f7b288af86..b3ce692ff0c 100644
--- a/intern/cycles/render/light.h
+++ b/intern/cycles/render/light.h
@@ -21,6 +21,10 @@
#include "graph/node.h"
+/* included as Light::set_shader defined through NODE_PUBLIC_API does not select
+ * the right Node::set overload as it does not know that Shader is a Node */
+#include "render/shader.h"
+
#include "util/util_ies.h"
#include "util/util_thread.h"
#include "util/util_types.h"
More information about the Bf-blender-cvs
mailing list