STNodeEditor icon indicating copy to clipboard operation
STNodeEditor copied to clipboard

Getting connected option from option

Open astromediaonly opened this issue 2 years ago • 1 comments

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?

astromediaonly avatar Dec 25 '23 18:12 astromediaonly

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.

MrKumakun avatar Feb 19 '24 16:02 MrKumakun