diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-08 16:06:32 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-08 16:10:30 +0300 |
commit | e3e42c00cb895f7e97c8f022d135dba351d47553 (patch) | |
tree | 29f2a1fec6a7c91902eea61bf01f4ce4167b3bcb /source | |
parent | 2b9d62b73af43a54a08a2377ddcf4f44b9456cbc (diff) |
Functions: Support getting MFSocket based on its id
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/functions/FN_multi_function_network.hh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/functions/FN_multi_function_network.hh b/source/blender/functions/FN_multi_function_network.hh index 195711a7c62..493b26e6510 100644 --- a/source/blender/functions/FN_multi_function_network.hh +++ b/source/blender/functions/FN_multi_function_network.hh @@ -226,6 +226,9 @@ class MFNetwork : NonCopyable, NonMovable { MFNode *node_or_null_by_id(uint id); const MFNode *node_or_null_by_id(uint id) const; + MFSocket *socket_or_null_by_id(uint id); + const MFSocket *socket_or_null_by_id(uint id) const; + std::string to_dot(Span<const MFNode *> marked_nodes = {}) const; }; @@ -505,6 +508,16 @@ inline const MFNode *MFNetwork::node_or_null_by_id(uint id) const return node_or_null_by_id_[id]; } +inline MFSocket *MFNetwork::socket_or_null_by_id(uint id) +{ + return socket_or_null_by_id_[id]; +} + +inline const MFSocket *MFNetwork::socket_or_null_by_id(uint id) const +{ + return socket_or_null_by_id_[id]; +} + inline uint MFNetwork::socket_id_amount() const { return socket_or_null_by_id_.size(); |