Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trees with reroutes #4512

Closed
Durman opened this issue Jun 4, 2022 · 3 comments · Fixed by #4513
Closed

Trees with reroutes #4512

Durman opened this issue Jun 4, 2022 · 3 comments · Fixed by #4513
Labels

Comments

@Durman
Copy link
Collaborator

Durman commented Jun 4, 2022

Problem statement

image

broken.zip

It seems that I messed something up in this method:

def _remove_reroutes(self):
for _node in self._from_nodes:
if _node.bl_idname == "NodeReroute":
# relink nodes
from_n = self._from_nodes[_node].pop()

In the update tree data structure I remove reroutes because there is no any sense to take them into account during updating trees. The code is not complex but delicate and it seems is better to add some tests for this step.

@Durman Durman added the bug 🐛 label Jun 4, 2022
@Durman
Copy link
Collaborator Author

Durman commented Jun 4, 2022

This is how I think the test should look like

image

@zeffii
Copy link
Collaborator

zeffii commented Jun 4, 2022

self.inputs['some_socket'].is_linked would return False is the input is from a reroute node with no upstream connection?

      no upstream connections        
            V                                      ___________some node_________
      (reroute) --------------------------------->| o [ some_socket]            |
                                                  |_____________________________| 

@Durman
Copy link
Collaborator Author

Durman commented Jun 4, 2022

The actual Blender tree is always unchanged so inside nodes the is_linked test will be true but update system uses its internal efficient data structure where the some_socket will be recognised as disconnected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants