From e7af04db0793b6c50194e22cb54ffc08629b8d2e Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 4 Feb 2021 16:36:34 +0100 Subject: 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 --- source/blender/functions/FN_cpp_type.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/functions') 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 create_cpp_type(StringRef name, const T &d static std::unique_ptr cpp_type = blender::fn::create_cpp_type( \ STRINGIFY(IDENTIFIER), default_value); \ return *cpp_type; \ + } \ + /* Support using `CPPType::get()`. Otherwise the caller would have to remove const. */ \ + template<> const blender::fn::CPPType &blender::fn::CPPType::get() \ + { \ + return blender::fn::CPPType::get(); \ } -- cgit v1.2.3