Inheritance: UnityEditorInternal.AnimationWindowHierarchyNode
 private AnimationWindowHierarchyPropertyGroupNode AddPropertyGroupToHierarchy(AnimationWindowCurve[] curves, AnimationWindowHierarchyNode parentNode)
 {
   List<AnimationWindowHierarchyNode> windowHierarchyNodeList = new List<AnimationWindowHierarchyNode>();
   AnimationWindowHierarchyPropertyGroupNode propertyGroupNode = new AnimationWindowHierarchyPropertyGroupNode(curves[0].type, AnimationWindowUtility.GetPropertyGroupName(curves[0].propertyName), curves[0].path, (TreeViewItem) parentNode);
   propertyGroupNode.icon = this.GetIcon(curves[0].binding);
   propertyGroupNode.indent = curves[0].depth;
   propertyGroupNode.curves = curves;
   foreach (AnimationWindowCurve curve in curves)
   {
     AnimationWindowHierarchyPropertyNode hierarchy = this.AddPropertyToHierarchy(curve, (AnimationWindowHierarchyNode) propertyGroupNode);
     hierarchy.displayName = AnimationWindowUtility.GetPropertyDisplayName(hierarchy.propertyName);
     windowHierarchyNodeList.Add((AnimationWindowHierarchyNode) hierarchy);
   }
   TreeViewUtility.SetChildParentReferences(new List<TreeViewItem>((IEnumerable<TreeViewItem>) windowHierarchyNodeList.ToArray()), (TreeViewItem) propertyGroupNode);
   return propertyGroupNode;
 }
        private AnimationWindowHierarchyPropertyGroupNode AddPropertyGroupToHierarchy(AnimationWindowCurve[] curves, AnimationWindowHierarchyNode parentNode)
        {
            List <AnimationWindowHierarchyNode>       windowHierarchyNodeList = new List <AnimationWindowHierarchyNode>();
            AnimationWindowHierarchyPropertyGroupNode propertyGroupNode       = new AnimationWindowHierarchyPropertyGroupNode(curves[0].type, AnimationWindowUtility.GetPropertyGroupName(curves[0].propertyName), curves[0].path, (TreeViewItem)parentNode);

            propertyGroupNode.icon   = this.GetIcon(curves[0].binding);
            propertyGroupNode.indent = curves[0].depth;
            propertyGroupNode.curves = curves;
            foreach (AnimationWindowCurve curve in curves)
            {
                AnimationWindowHierarchyPropertyNode hierarchy = this.AddPropertyToHierarchy(curve, (AnimationWindowHierarchyNode)propertyGroupNode);
                hierarchy.displayName = AnimationWindowUtility.GetPropertyDisplayName(hierarchy.propertyName);
                windowHierarchyNodeList.Add((AnimationWindowHierarchyNode)hierarchy);
            }
            TreeViewUtility.SetChildParentReferences(new List <TreeViewItem>((IEnumerable <TreeViewItem>)windowHierarchyNodeList.ToArray()), (TreeViewItem)propertyGroupNode);
            return(propertyGroupNode);
        }
 private AnimationWindowHierarchyPropertyGroupNode AddPropertyGroupToHierarchy(AnimationWindowCurve[] curves, AnimationWindowHierarchyNode parentNode)
 {
     List<AnimationWindowHierarchyNode> list = new List<AnimationWindowHierarchyNode>();
     AnimationWindowHierarchyPropertyGroupNode node = new AnimationWindowHierarchyPropertyGroupNode(curves[0].type, AnimationWindowUtility.GetPropertyGroupName(curves[0].propertyName), curves[0].path, parentNode) {
         icon = this.GetIcon(curves[0].binding),
         indent = curves[0].depth,
         curves = curves
     };
     foreach (AnimationWindowCurve curve in curves)
     {
         AnimationWindowHierarchyPropertyNode item = this.AddPropertyToHierarchy(curve, node);
         item.displayName = AnimationWindowUtility.GetPropertyDisplayName(item.propertyName);
         list.Add(item);
     }
     TreeViewUtility.SetChildParentReferences(new List<TreeViewItem>(list.ToArray()), node);
     return node;
 }
		private AnimationWindowHierarchyPropertyGroupNode AddPropertyGroupToHierarchy(AnimationWindowCurve[] curves, AnimationWindowHierarchyNode parentNode)
		{
			List<AnimationWindowHierarchyNode> list = new List<AnimationWindowHierarchyNode>();
			Type type = curves[0].type;
			AnimationWindowHierarchyPropertyGroupNode animationWindowHierarchyPropertyGroupNode = new AnimationWindowHierarchyPropertyGroupNode(type, AnimationWindowUtility.GetPropertyGroupName(curves[0].propertyName), curves[0].path, parentNode);
			animationWindowHierarchyPropertyGroupNode.icon = this.GetIcon(curves[0].binding);
			animationWindowHierarchyPropertyGroupNode.indent = curves[0].depth;
			animationWindowHierarchyPropertyGroupNode.curves = curves;
			for (int i = 0; i < curves.Length; i++)
			{
				AnimationWindowCurve curve = curves[i];
				AnimationWindowHierarchyPropertyNode animationWindowHierarchyPropertyNode = this.AddPropertyToHierarchy(curve, animationWindowHierarchyPropertyGroupNode);
				animationWindowHierarchyPropertyNode.displayName = AnimationWindowUtility.GetPropertyDisplayName(animationWindowHierarchyPropertyNode.propertyName);
				list.Add(animationWindowHierarchyPropertyNode);
			}
			TreeViewUtility.SetChildParentReferences(new List<TreeViewItem>(list.ToArray()), animationWindowHierarchyPropertyGroupNode);
			return animationWindowHierarchyPropertyGroupNode;
		}
Esempio n. 5
0
        private AnimationWindowHierarchyPropertyGroupNode AddPropertyGroupToHierarchy(AnimationWindowCurve[] curves, AnimationWindowHierarchyNode parentNode)
        {
            List <AnimationWindowHierarchyNode> list = new List <AnimationWindowHierarchyNode>();
            Type type = curves[0].type;
            AnimationWindowHierarchyPropertyGroupNode animationWindowHierarchyPropertyGroupNode = new AnimationWindowHierarchyPropertyGroupNode(type, AnimationWindowUtility.GetPropertyGroupName(curves[0].propertyName), curves[0].path, parentNode);

            animationWindowHierarchyPropertyGroupNode.icon   = this.GetIcon(curves[0].binding);
            animationWindowHierarchyPropertyGroupNode.indent = curves[0].depth;
            animationWindowHierarchyPropertyGroupNode.curves = curves;
            for (int i = 0; i < curves.Length; i++)
            {
                AnimationWindowCurve curve = curves[i];
                AnimationWindowHierarchyPropertyNode animationWindowHierarchyPropertyNode = this.AddPropertyToHierarchy(curve, animationWindowHierarchyPropertyGroupNode);
                animationWindowHierarchyPropertyNode.displayName = AnimationWindowUtility.GetPropertyDisplayName(animationWindowHierarchyPropertyNode.propertyName);
                list.Add(animationWindowHierarchyPropertyNode);
            }
            TreeViewUtility.SetChildParentReferences(new List <TreeViewItem>(list.ToArray()), animationWindowHierarchyPropertyGroupNode);
            return(animationWindowHierarchyPropertyGroupNode);
        }
Esempio n. 6
0
        private AnimationWindowHierarchyPropertyGroupNode AddPropertyGroupToHierarchy(AnimationWindowCurve[] curves, AnimationWindowHierarchyNode parentNode)
        {
            List <AnimationWindowHierarchyNode>       list = new List <AnimationWindowHierarchyNode>();
            AnimationWindowHierarchyPropertyGroupNode node = new AnimationWindowHierarchyPropertyGroupNode(curves[0].type, AnimationWindowUtility.GetPropertyGroupName(curves[0].propertyName), curves[0].path, parentNode)
            {
                icon   = this.GetIcon(curves[0].binding),
                indent = curves[0].depth,
                curves = curves
            };

            foreach (AnimationWindowCurve curve in curves)
            {
                AnimationWindowHierarchyPropertyNode item = this.AddPropertyToHierarchy(curve, node);
                item.displayName = AnimationWindowUtility.GetPropertyDisplayName(item.propertyName);
                list.Add(item);
            }
            TreeViewUtility.SetChildParentReferences(new List <TreeViewItem>(list.ToArray()), node);
            return(node);
        }
        private AnimationWindowHierarchyPropertyGroupNode AddPropertyGroupToHierarchy(AnimationWindowCurve[] curves, AnimationWindowHierarchyNode parentNode)
        {
            List <AnimationWindowHierarchyNode> childNodes = new List <AnimationWindowHierarchyNode>();

            System.Type animatableObjectType = curves[0].type;
            AnimationWindowHierarchyPropertyGroupNode node = new AnimationWindowHierarchyPropertyGroupNode(animatableObjectType, 0, AnimationWindowUtility.GetPropertyGroupName(curves[0].propertyName), curves[0].path, parentNode);

            node.icon = GetIcon(curves[0].binding);

            node.indent = curves[0].depth;
            node.curves = curves;

            foreach (AnimationWindowCurve curve in curves)
            {
                AnimationWindowHierarchyPropertyNode childNode = AddPropertyToHierarchy(curve, node);
                // For child nodes we do not want to display the type in front (It is already shown by the group node)
                childNode.displayName = AnimationWindowUtility.GetPropertyDisplayName(childNode.propertyName);
                childNodes.Add(childNode);
            }

            TreeViewUtility.SetChildParentReferences(new List <TreeViewItem>(childNodes.ToArray()), node);
            return(node);
        }