diff options
Diffstat (limited to 'source/blender/functions/FN_multi_function_signature.hh')
-rw-r--r-- | source/blender/functions/FN_multi_function_signature.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/functions/FN_multi_function_signature.hh b/source/blender/functions/FN_multi_function_signature.hh index af5f61fe2ee..26df7c98e4a 100644 --- a/source/blender/functions/FN_multi_function_signature.hh +++ b/source/blender/functions/FN_multi_function_signature.hh @@ -36,6 +36,7 @@ struct MFSignature { RawVector<std::string> param_names; RawVector<MFParamType> param_types; RawVector<int> param_data_indices; + bool depends_on_context = false; int data_index(int param_index) const { @@ -157,6 +158,15 @@ class MFSignatureBuilder { break; } } + + /* Context */ + + /** This indicates that the function accesses the context. This disables optimizations that + * depend on the fact that the function always performes the same operation. */ + void depends_on_context() + { + data_.depends_on_context = true; + } }; } // namespace blender::fn |