DebugST / STNodeEditor

一款基于.Net WinForm的节点编辑器 纯GDI+绘制 使用方式非常简洁 提供了丰富的属性以及事件 可以非常方便的完成节点之间数据的交互及通知 大量的虚函数供开发者重写具有很高的自由性
MIT License
610 stars 187 forks source link

Getting connected option from option #21

Open astromediaonly opened 9 months ago

astromediaonly commented 9 months ago

Hi, Im probably understanding something poorly but Im trying to get option connected to my option and it acts like this: opt.ConnectionCount returns 1 but opt.GetConnectedOption() returns list of 0 elements

Any idea why this could happen or what Im doing/understanding incorrectly?

MrKumakun commented 7 months ago

Hi,

The Outpout side is referenced in m_hs_connected.Tolist(), so you can get it. But, the Input side seems to be a problem.

if (v.Output == this) lst.Add(v.Input);

v.Output is deep copy object, so comparison between objects is not valid. Object.ReferenceEquals cannot be used.

Is there another way around this?


I'm not very good at English and I use online translators a lot, so I'm sorry if my sentences sound weird.