Esempio n. 1
0
 public static IINodeTab Join(this IINodeTab nodeTab, IINodeTab other)
 {
     foreach (IINode node in other.ToIEnumerable())
     {
         nodeTab.AppendNode(node, false, 0);
     }
     return(nodeTab);
 }
Esempio n. 2
0
        public static IINodeTab GetAncestors(this IINodeTab nodeTab)
        {
#if MAX2020 || MAX2021 || MAX2022
            IINodeTab ancestors = Loader.Global.INodeTab.Create();
#else
            IINodeTab ancestors = Loader.Global.INodeTabNS.Create();
#endif
            foreach (IINode node in nodeTab.ToIEnumerable())
            {
                if (!nodeTab.Contains(node.ParentNode))
                {
                    ancestors.InsertNode(node, 0, false);
                }
            }
            return(ancestors);
        }