forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddCurvesPopupPropertyNode.cs
More file actions
28 lines (28 loc) · 908 Bytes
/
Copy pathAddCurvesPopupPropertyNode.cs
File metadata and controls
28 lines (28 loc) · 908 Bytes
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
using System;
using UnityEditor;
namespace UnityEditorInternal
{
internal class AddCurvesPopupPropertyNode : TreeViewItem
{
public EditorCurveBinding[] curveBindings;
public AddCurvesPopupPropertyNode(TreeViewItem parent, EditorCurveBinding[] curveBindings) : base(curveBindings[0].GetHashCode(), parent.depth + 1, parent, AnimationWindowUtility.NicifyPropertyGroupName(curveBindings[0].type, AnimationWindowUtility.GetPropertyGroupName(curveBindings[0].propertyName)))
{
this.curveBindings = curveBindings;
}
public override int CompareTo(TreeViewItem other)
{
if (other is AddCurvesPopupPropertyNode)
{
if (this.displayName.Contains("Rotation") && other.displayName.Contains("Position"))
{
return 1;
}
if (this.displayName.Contains("Position") && other.displayName.Contains("Rotation"))
{
return -1;
}
}
return base.CompareTo(other);
}
}
}