Notifications
Clear all
[Closed] Sort function C#
Mar 25, 2020 9:12 pm
public static int CMP(IntPtr param0, IntPtr param1)
{
IINode A = GlobalInterface.Instance.INode.Marshal(param0);
IINode B = GlobalInterface.Instance.INode.Marshal(param1);
var a = A.GetNodeTM(Now, interval).Trans; // not able to access Trans, max crash here
var b = B.GetNodeTM(Now, interval).Trans; // not able to access Trans
return (true) ? -1 : ((true) ? 1 : 0);
}
IINodeTab sceneobjs = GlobalInterface.Instance.INodeTab.Create();
GlobalInterface.Instance.COREInterface19.GetSelNodeTab(sceneobjs);
GlobalDelegates.Delegate19 delegate19 = new GlobalDelegates.Delegate19(CMP);
sceneobjs.Sort(delegate19);
````
i'll return value based on position of selected nodes , how can i access Trans for each node in fuction
thanks.