public static bool IsNodeAmbiguous(AnimationWindowHierarchyNode node) { EditorCurveBinding?binding = node.binding; bool result; if (binding.HasValue) { if (node.curves.Length > 0) { AnimationWindowSelectionItem selectionBinding = node.curves[0].selectionBinding; if (selectionBinding != null) { if (selectionBinding.rootGameObject != null) { result = AnimationUtility.AmbiguousBinding(node.binding.Value.path, node.binding.Value.m_ClassID, selectionBinding.rootGameObject.transform); return(result); } } } } if (node.hasChildren) { using (List <TreeViewItem> .Enumerator enumerator = node.children.GetEnumerator()) { if (enumerator.MoveNext()) { TreeViewItem current = enumerator.Current; result = AnimationWindowUtility.IsNodeAmbiguous(current as AnimationWindowHierarchyNode); return(result); } } } result = false; return(result); }
public static bool IsNodeAmbiguous(AnimationWindowHierarchyNode node, GameObject rootGameObject) { if (rootGameObject == null) { return(false); } EditorCurveBinding?binding = node.binding; if (binding.HasValue) { return(AnimationUtility.AmbiguousBinding(node.binding.Value.path, node.binding.Value.m_ClassID, rootGameObject.transform)); } if (node.hasChildren) { using (List <TreeViewItem> .Enumerator enumerator = node.children.GetEnumerator()) { if (enumerator.MoveNext()) { TreeViewItem current = enumerator.Current; return(AnimationWindowUtility.IsNodeAmbiguous(current as AnimationWindowHierarchyNode, rootGameObject)); } } return(false); } return(false); }
public static bool IsNodeAmbiguous(AnimationWindowHierarchyNode node, GameObject rootGameObject) { if (rootGameObject != null) { if (node.binding.HasValue) { return(AnimationUtility.AmbiguousBinding(node.binding.Value.path, node.binding.Value.m_ClassID, rootGameObject.transform)); } if (node.hasChildren) { foreach (TreeViewItem item in node.children) { return(IsNodeAmbiguous(item as AnimationWindowHierarchyNode, rootGameObject)); } } } return(false); }