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
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-09-03 15:38:15 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-09-03 15:38:15 +0400
commit0238d032b2d079dbdf8ae96a1128fc3c2e12f548 (patch)
treedfbaf3591be5e03cd47a0704cb363d3f28ec6bc6 /intern/cycles/render/graph.h
parentacebddeb235b13915e3034bce1fa9bab1d51e94b (diff)
Replaced dynamic_casts for node type checks by simple 'special type' identifiers. RTTI has to be disabled in cycles for OSL.
Diffstat (limited to 'intern/cycles/render/graph.h')
-rw-r--r--intern/cycles/render/graph.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h
index 91ec83aba21..c3b674d0f23 100644
--- a/intern/cycles/render/graph.h
+++ b/intern/cycles/render/graph.h
@@ -63,6 +63,17 @@ enum ShaderBump {
SHADER_BUMP_DY
};
+/* Identifiers for some special node types.
+ *
+ * The graph needs to identify these in the clean function.
+ * Cannot use dynamic_cast, as this is disabled for OSL. */
+
+enum ShaderNodeSpecialType {
+ SHADER_SPECIAL_TYPE_NONE,
+ SHADER_SPECIAL_TYPE_PROXY,
+ SHADER_SPECIAL_TYPE_MIX_CLOSURE
+};
+
/* Enum
*
* Utility class for enum values. */
@@ -167,6 +178,8 @@ public:
ustring name; /* name, not required to be unique */
int id; /* index in graph node array */
ShaderBump bump; /* for bump mapping utility */
+
+ ShaderNodeSpecialType special_type; /* special node type */
};