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:
authorHans Goudey <h.goudey@me.com>2022-07-22 17:59:28 +0300
committerHans Goudey <h.goudey@me.com>2022-07-22 17:59:28 +0300
commit6bcda04d1f1cc396dcc188678997105b09231bde (patch)
tree3f83a3c86a476408f054755d651e0e6f694500cb /source/blender/functions
parent1f94b56d774440d08eb92f2a7a47b9a6a7aa7b84 (diff)
Geometry Nodes: Port sample curves node to new data-block
Use the newer more generic sampling and interpolation functions developed recently (ab444a80a280) instead of the `CurveEval` type. Functions are split up a bit more internally, to allow a separate mode for supplying the curve index directly in the future (T92474). In one basic test, the performance seems mostly unchanged from 3.1. Differential Revision: https://developer.blender.org/D14621
Diffstat (limited to 'source/blender/functions')
-rw-r--r--source/blender/functions/FN_field.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh
index a8136d06c5f..bc42cab8db5 100644
--- a/source/blender/functions/FN_field.hh
+++ b/source/blender/functions/FN_field.hh
@@ -221,6 +221,17 @@ class FieldOperation : public FieldNode {
const MultiFunction &multi_function() const;
const CPPType &output_cpp_type(int output_index) const override;
+
+ static std::shared_ptr<FieldOperation> Create(std::shared_ptr<const MultiFunction> function,
+ Vector<GField> inputs = {})
+ {
+ return std::make_shared<FieldOperation>(FieldOperation(std::move(function), inputs));
+ }
+ static std::shared_ptr<FieldOperation> Create(const MultiFunction &function,
+ Vector<GField> inputs = {})
+ {
+ return std::make_shared<FieldOperation>(FieldOperation(function, inputs));
+ }
};
class FieldContext;