diff options
Diffstat (limited to 'intern/cycles/graph/node.cpp')
-rw-r--r-- | intern/cycles/graph/node.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/graph/node.cpp b/intern/cycles/graph/node.cpp index 4f79a7518dc..1439fb5a407 100644 --- a/intern/cycles/graph/node.cpp +++ b/intern/cycles/graph/node.cpp @@ -669,4 +669,14 @@ size_t Node::get_total_size_in_bytes() const return total_size; } +bool Node::is_a(const NodeType *type_) +{ + for (const NodeType *base = type; base; base = base->base) { + if (base == type_) { + return true; + } + } + return false; +} + CCL_NAMESPACE_END |