[Bf-blender-cvs] [0b0aba3cee2] temp-derived-node-tree-refactor: support constructing context

Jacques Lucke noreply at git.blender.org
Wed Mar 3 09:57:03 CET 2021


Commit: 0b0aba3cee27e96b0e6782120c9e1099ad6da64a
Author: Jacques Lucke
Date:   Wed Mar 3 09:17:45 2021 +0100
Branches: temp-derived-node-tree-refactor
https://developer.blender.org/rB0b0aba3cee27e96b0e6782120c9e1099ad6da64a

support constructing context

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

M	source/blender/nodes/NOD_XXX_node_tree.hh

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

diff --git a/source/blender/nodes/NOD_XXX_node_tree.hh b/source/blender/nodes/NOD_XXX_node_tree.hh
index 6587ff3113a..db2e2ea58e3 100644
--- a/source/blender/nodes/NOD_XXX_node_tree.hh
+++ b/source/blender/nodes/NOD_XXX_node_tree.hh
@@ -43,11 +43,14 @@ class XXXNodeTreeContextInfo {
 
 class XXXNodeTreeContext {
  private:
-  XXXNodeTreeContextInfo *context_info_ = nullptr;
+  const XXXNodeTreeContextInfo *context_info_ = nullptr;
 
   friend XXXNodeTree;
 
  public:
+  XXXNodeTreeContext() = default;
+  XXXNodeTreeContext(const XXXNodeTreeContextInfo *context_info);
+
   friend bool operator==(const XXXNodeTreeContext &a, const XXXNodeTreeContext &b);
   friend bool operator!=(const XXXNodeTreeContext &a, const XXXNodeTreeContext &b);
 
@@ -77,7 +80,6 @@ struct XXXSocket {
 
   XXXSocket() = default;
   XXXSocket(XXXNodeTreeContext context, const SocketRef *socket);
-
   XXXSocket(const XXXInputSocket &input_socket);
   XXXSocket(const XXXOutputSocket &output_socket);
 
@@ -154,6 +156,11 @@ inline const NodeTreeRef &XXXNodeTreeContextInfo::tree() const
  * XXXNodeTreeContext inline methods.
  */
 
+inline XXXNodeTreeContext::XXXNodeTreeContext(const XXXNodeTreeContextInfo *context_info)
+    : context_info_(context_info)
+{
+}
+
 inline bool operator==(const XXXNodeTreeContext &a, const XXXNodeTreeContext &b)
 {
   return a.context_info_ == b.context_info_;



More information about the Bf-blender-cvs mailing list