diff options
author | Jacques Lucke <jacques@blender.org> | 2021-02-04 18:36:34 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-02-04 18:36:34 +0300 |
commit | e7af04db0793b6c50194e22cb54ffc08629b8d2e (patch) | |
tree | 2a0717f6c8e417edea8adae721388402fd30db37 /source/blender/functions | |
parent | 95703d19e0105bf64350b97fc094d4582f388329 (diff) |
Geometry Nodes: new Is Viewport node
This node outputs true when geometry nodes is currently evaluated
for the viewport and false for final renders.
Ref T85277.
Differential Revision: https://developer.blender.org/D10302
Diffstat (limited to 'source/blender/functions')
-rw-r--r-- | source/blender/functions/FN_cpp_type.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/functions/FN_cpp_type.hh b/source/blender/functions/FN_cpp_type.hh index 5a7dfadf537..a854e63288d 100644 --- a/source/blender/functions/FN_cpp_type.hh +++ b/source/blender/functions/FN_cpp_type.hh @@ -929,4 +929,9 @@ inline std::unique_ptr<const CPPType> create_cpp_type(StringRef name, const T &d static std::unique_ptr<const CPPType> cpp_type = blender::fn::create_cpp_type<TYPE_NAME>( \ STRINGIFY(IDENTIFIER), default_value); \ return *cpp_type; \ + } \ + /* Support using `CPPType::get<const T>()`. Otherwise the caller would have to remove const. */ \ + template<> const blender::fn::CPPType &blender::fn::CPPType::get<const TYPE_NAME>() \ + { \ + return blender::fn::CPPType::get<TYPE_NAME>(); \ } |