[Bf-blender-cvs] [e3e42c00cb8] master: Functions: Support getting MFSocket based on its id

Jacques Lucke noreply at git.blender.org
Wed Jul 8 15:11:24 CEST 2020


Commit: e3e42c00cb895f7e97c8f022d135dba351d47553
Author: Jacques Lucke
Date:   Wed Jul 8 15:06:32 2020 +0200
Branches: master
https://developer.blender.org/rBe3e42c00cb895f7e97c8f022d135dba351d47553

Functions: Support getting MFSocket based on its id

===================================================================

M	source/blender/functions/FN_multi_function_network.hh

===================================================================

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();



More information about the Bf-blender-cvs mailing list