diff options
Diffstat (limited to 'source/blender/nodes/function')
-rw-r--r-- | source/blender/nodes/function/nodes/node_fn_object_transforms.cc | 9 | ||||
-rw-r--r-- | source/blender/nodes/function/nodes/node_fn_random_float.cc | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/nodes/function/nodes/node_fn_object_transforms.cc b/source/blender/nodes/function/nodes/node_fn_object_transforms.cc index 55f592d7879..a73049776e5 100644 --- a/source/blender/nodes/function/nodes/node_fn_object_transforms.cc +++ b/source/blender/nodes/function/nodes/node_fn_object_transforms.cc @@ -32,10 +32,17 @@ class ObjectTransformsFunction : public blender::fn::MultiFunction { public: ObjectTransformsFunction() { - blender::fn::MFSignatureBuilder signature = this->get_builder("Object Transforms"); + static blender::fn::MFSignature signature = create_signature(); + this->set_signature(&signature); + } + + static blender::fn::MFSignature create_signature() + { + blender::fn::MFSignatureBuilder signature{"Object Transforms"}; signature.depends_on_context(); signature.single_input<blender::bke::PersistentObjectHandle>("Object"); signature.single_output<blender::float3>("Location"); + return signature.build(); } void call(blender::IndexMask mask, diff --git a/source/blender/nodes/function/nodes/node_fn_random_float.cc b/source/blender/nodes/function/nodes/node_fn_random_float.cc index 84ded73c601..d156cd431e0 100644 --- a/source/blender/nodes/function/nodes/node_fn_random_float.cc +++ b/source/blender/nodes/function/nodes/node_fn_random_float.cc @@ -37,11 +37,18 @@ class RandomFloatFunction : public blender::fn::MultiFunction { public: RandomFloatFunction(uint32_t function_seed) : function_seed_(function_seed) { - blender::fn::MFSignatureBuilder signature = this->get_builder("Random float"); + static blender::fn::MFSignature signature = create_signature(); + this->set_signature(&signature); + } + + static blender::fn::MFSignature create_signature() + { + blender::fn::MFSignatureBuilder signature{"Random float"}; signature.single_input<float>("Min"); signature.single_input<float>("Max"); signature.single_input<int>("Seed"); signature.single_output<float>("Value"); + return signature.build(); } void call(blender::IndexMask mask, |