diff options
Diffstat (limited to 'source/blender/nodes/NOD_node_tree_multi_function.hh')
-rw-r--r-- | source/blender/nodes/NOD_node_tree_multi_function.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/nodes/NOD_node_tree_multi_function.hh b/source/blender/nodes/NOD_node_tree_multi_function.hh index 79c2b3c7ce8..81b467eca3a 100644 --- a/source/blender/nodes/NOD_node_tree_multi_function.hh +++ b/source/blender/nodes/NOD_node_tree_multi_function.hh @@ -288,7 +288,12 @@ class SocketMFNetworkBuilder : public MFNetworkBuilderBase { */ template<typename T> void set_constant_value(T value) { - const fn::MultiFunction &fn = this->construct_fn<fn::CustomMF_Constant<T>>(std::move(value)); + this->construct_generator_fn<fn::CustomMF_Constant<T>>(std::move(value)); + } + + template<typename T, typename... Args> void construct_generator_fn(Args &&... args) + { + const fn::MultiFunction &fn = this->construct_fn<T>(std::forward<Args>(args)...); this->set_generator_fn(fn); } |