forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimationWindowHierarchyNode.cs
More file actions
74 lines (63 loc) · 3.14 KB
/
Copy pathAnimationWindowHierarchyNode.cs
File metadata and controls
74 lines (63 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using UnityEditor;
using UnityEngine;
using System.Collections.Generic;
using UnityEditor.IMGUI.Controls;
namespace UnityEditorInternal
{
internal class AnimationWindowHierarchyNode : TreeViewItem
{
public string path;
public System.Type animatableObjectType;
public string propertyName;
public EditorCurveBinding? binding;
public AnimationWindowCurve[] curves;
public float? topPixel = null;
public int indent = 0;
public AnimationWindowHierarchyNode(int instanceID, int depth, TreeViewItem parent, System.Type animatableObjectType, string propertyName, string path, string displayName)
: base(instanceID, depth, parent, displayName)
{
this.displayName = displayName;
this.animatableObjectType = animatableObjectType;
this.propertyName = propertyName;
this.path = path;
}
}
internal class AnimationWindowHierarchyPropertyGroupNode : AnimationWindowHierarchyNode
{
public AnimationWindowHierarchyPropertyGroupNode(System.Type animatableObjectType, int setId, string propertyName, string path, TreeViewItem parent)
: base(AnimationWindowUtility.GetPropertyNodeID(setId, path, animatableObjectType, propertyName), parent != null ? parent.depth + 1 : -1, parent, animatableObjectType, AnimationWindowUtility.GetPropertyGroupName(propertyName), path, AnimationWindowUtility.GetNicePropertyGroupDisplayName(animatableObjectType, propertyName))
{}
}
internal class AnimationWindowHierarchyPropertyNode : AnimationWindowHierarchyNode
{
public bool isPptrNode;
public AnimationWindowHierarchyPropertyNode(System.Type animatableObjectType, int setId, string propertyName, string path, TreeViewItem parent, EditorCurveBinding binding, bool isPptrNode)
: base(AnimationWindowUtility.GetPropertyNodeID(setId, path, animatableObjectType, propertyName), parent != null ? parent.depth + 1 : -1, parent, animatableObjectType, propertyName, path, AnimationWindowUtility.GetNicePropertyDisplayName(animatableObjectType, propertyName))
{
this.binding = binding;
this.isPptrNode = isPptrNode;
}
}
internal class AnimationWindowHierarchyClipNode : AnimationWindowHierarchyNode
{
public AnimationWindowHierarchyClipNode(TreeViewItem parent, int setId, string name)
: base(setId, parent != null ? parent.depth + 1 : -1, parent, null, null, null, name)
{}
}
internal class AnimationWindowHierarchyMasterNode : AnimationWindowHierarchyNode
{
public AnimationWindowHierarchyMasterNode()
: base(0, -1, null, null, null, null, "")
{}
}
// A special node to put "Add Curve" button in bottom of the tree
internal class AnimationWindowHierarchyAddButtonNode : AnimationWindowHierarchyNode
{
public AnimationWindowHierarchyAddButtonNode()
: base(0, -1, null, null, null, null, "")
{}
}
}