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:
authorJacques Lucke <jacques@blender.org>2021-09-20 14:12:25 +0300
committerJacques Lucke <jacques@blender.org>2021-09-20 14:12:25 +0300
commitfc4f82d2004c843691d81afff0f7abb38caace0a (patch)
tree6576de4fe76a41e1dc44d0dd7c477bd22099956c /source/blender/functions/FN_multi_function_params.hh
parent8c7c4549d1fba8eb2236fa397d95b32ad1262789 (diff)
Geometry Nodes: support Noise Texture node
This makes the Noise Texture node available in geometry nodes. It should behave the same as in shader node, with the exception that it does not have an implicit position input yet. That will be added separately. Differential Revision: https://developer.blender.org/D12467
Diffstat (limited to 'source/blender/functions/FN_multi_function_params.hh')
-rw-r--r--source/blender/functions/FN_multi_function_params.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/functions/FN_multi_function_params.hh b/source/blender/functions/FN_multi_function_params.hh
index fe4d2b90d80..d187985de9d 100644
--- a/source/blender/functions/FN_multi_function_params.hh
+++ b/source/blender/functions/FN_multi_function_params.hh
@@ -272,6 +272,22 @@ class MFParams {
return span;
}
+ /**
+ * Same as #uninitialized_single_output, but returns an empty span when the output is not
+ * required.
+ */
+ template<typename T>
+ MutableSpan<T> uninitialized_single_output_if_required(int param_index, StringRef name = "")
+ {
+ return this->uninitialized_single_output_if_required(param_index, name).typed<T>();
+ }
+ GMutableSpan uninitialized_single_output_if_required(int param_index, StringRef name = "")
+ {
+ this->assert_correct_param(param_index, name, MFParamType::SingleOutput);
+ int data_index = builder_->signature_->data_index(param_index);
+ return builder_->mutable_spans_[data_index];
+ }
+
template<typename T>
const VVectorArray<T> &readonly_vector_input(int param_index, StringRef name = "")
{