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

Node.Inputs count does not match what is visible #363

Open
EppuSyyrakki opened this issue Feb 1, 2023 · 1 comment
Open

Node.Inputs count does not match what is visible #363

EppuSyyrakki opened this issue Feb 1, 2023 · 1 comment

Comments

@EppuSyyrakki
Copy link

EppuSyyrakki commented Feb 1, 2023

Setup: An abstract TreeNode class inherits from XNode.Node and has a method that uses the Node.Inputs property. The abstract class has no inputs of its own, but Sequence : TreeNode class has a dynamic port list with 2 elements connected.
edit: There is no custom editor code anywhere.

invisible port editor

Problem: When debugging Node.Inputs.ToArray() inside the inheriting class, we see the port count is actually 3. The first port is a non-dynamic port without any connection. I have no idea where this is coming from. Other classes inheriting from TreeNode that have a (single) non-dynamic input port display the correct port count.

extra input

Any idea what is happening?

P.S. Excellent work. XNode is present in some form in almost every project I've worked on.

@Siccity
Copy link
Owner

Siccity commented Feb 15, 2023

Could you try getting the names of the ports? Maybe that will shed some light on the issue.
Dynamic Port Lists name their ports [fieldname] [index], but perhaps it also added an extra port for the array itself that is just named [fieldname]

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

No branches or pull requests

2 participants