소스 검색

Fix: ensure autogen nodes have mContext

Joseph Brandenburg 5 달 전
부모
커밋
c0497585b6
2개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      readtree.py
  2. 2 0
      schema_solve.py

+ 1 - 0
readtree.py

@@ -113,6 +113,7 @@ def make_connections_to_ng_dummy(base_tree, tree_path_names, local_nc, all_nc, n
             if (nc_cls):
                 sig = ("MANTIS_AUTOGENERATED", *tree_path_names, np.name, inp.name, inp.identifier)
                 nc_from = nc_cls(sig, base_tree)
+                nc_from.mContext = nc_to.mContext
                 # ugly! maybe even a HACK!
                 nc_from.inputs = {}
                 nc_from.outputs = {inp.name:NodeSocket(name = inp.name, node=nc_from)}

+ 2 - 0
schema_solve.py

@@ -220,6 +220,7 @@ class SchemaSolver:
                 nc_from = frame_mantis_nodes.get(sig)
                 if not nc_from:
                     nc_from = nc_cls(sig, self.node.base_tree)
+                    nc_from.mContext = self.node.mContext
                 # ugly! maybe even a HACK!
                 nc_from.inputs = {}
                 from .base_definitions import NodeSocket
@@ -437,6 +438,7 @@ class SchemaSolver:
                 if (nc_cls): #HACK
                     sig = ("MANTIS_AUTOGENERATED", *self.tree_path_names[1:-1], self.index_str(), ui_link.from_socket.name, ui_link.from_socket.identifier)
                     nc_from = nc_cls(sig, self.node.base_tree)
+                    nc_from.mContext = self.node.mContext
                     nc_from.execution_prepared=True
                     # ugly! maybe even a HACK!
                     nc_from.inputs = {}