akaaafk commited on
Commit
940fb62
·
verified ·
1 Parent(s): f0d6ad0

Add files using upload-large-folder tool

Browse files
Files changed (20) hide show
  1. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache/BaseObject.cs.meta +11 -0
  2. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache/Cache.cs +141 -0
  3. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache/Cache.cs.meta +11 -0
  4. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache/CacheObject.cs +39 -0
  5. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache/CacheObject.cs.meta +11 -0
  6. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CharacterModeTool/SwitchModeTool.cs +25 -0
  7. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CharacterModeTool/SwitchModeTool.cs.meta +11 -0
  8. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/ICircleSelector.cs.meta +11 -0
  9. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/IRectSelector.cs +9 -0
  10. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/IRectSelector.cs.meta +11 -0
  11. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/ISelector.cs +11 -0
  12. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/ISelector.cs.meta +11 -0
  13. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/RectBoneSelector.cs +35 -0
  14. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/RectBoneSelector.cs.meta +11 -0
  15. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/RectVertexSelector.cs +21 -0
  16. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/RectVertexSelector.cs.meta +11 -0
  17. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/Unselector.cs +14 -0
  18. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/Unselector.cs.meta +11 -0
  19. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkeletonTool/SkeletonStyles.cs +142 -0
  20. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkeletonTool/SkeletonStyles.cs.meta +11 -0
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache/BaseObject.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 9ceaf8ef48b796342bb695b046536af8
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache/Cache.cs ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using System.Linq;
4
+ using UnityEngine;
5
+
6
+ namespace UnityEditor.U2D.Animation
7
+ {
8
+ internal class Cache : BaseObject, ICacheUndo
9
+ {
10
+ public static T Create<T>() where T : Cache
11
+ {
12
+ var cache = CreateInstance<T>();
13
+ cache.hideFlags = HideFlags.DontSave;
14
+ return cache;
15
+ }
16
+
17
+ public static void Destroy(Cache cache)
18
+ {
19
+ cache.Destroy();
20
+ DestroyImmediate(cache);
21
+ }
22
+
23
+ [SerializeField]
24
+ private List<CacheObject> m_CacheObjects = new List<CacheObject>();
25
+ [SerializeField]
26
+ private List<CacheObject> m_RemovedCacheObjects = new List<CacheObject>();
27
+ private string m_UndoOperationName = null;
28
+ private IUndo m_DefaultUndo = new UnityEngineUndo();
29
+ private IUndo m_UndoOverride = null;
30
+
31
+ protected IUndo undo
32
+ {
33
+ get
34
+ {
35
+ if (undoOverride != null)
36
+ return undoOverride;
37
+
38
+ return m_DefaultUndo;
39
+ }
40
+ }
41
+
42
+ public IUndo undoOverride
43
+ {
44
+ get { return m_UndoOverride; }
45
+ set { m_UndoOverride = value; }
46
+ }
47
+
48
+ public bool isUndoOperationSet
49
+ {
50
+ get { return string.IsNullOrEmpty(m_UndoOperationName) == false; }
51
+ }
52
+
53
+ public void IncrementCurrentGroup()
54
+ {
55
+ undo.IncrementCurrentGroup();
56
+ }
57
+
58
+ public virtual void BeginUndoOperation(string operationName)
59
+ {
60
+ if (isUndoOperationSet == false)
61
+ {
62
+ Debug.Assert(!m_CacheObjects.Contains(null));
63
+
64
+ m_UndoOperationName = operationName;
65
+ undo.RegisterCompleteObjectUndo(this, m_UndoOperationName);
66
+ undo.RegisterCompleteObjectUndo(m_CacheObjects.ToArray(), m_UndoOperationName);
67
+ undo.RegisterCompleteObjectUndo(m_RemovedCacheObjects.ToArray(), m_UndoOperationName);
68
+ }
69
+ }
70
+
71
+ public void EndUndoOperation()
72
+ {
73
+ m_UndoOperationName = null;
74
+ }
75
+
76
+ public bool IsRemoved(CacheObject cacheObject)
77
+ {
78
+ return m_RemovedCacheObjects.Contains(cacheObject);
79
+ }
80
+
81
+ public T CreateCache<T>() where T : CacheObject
82
+ {
83
+ var cacheObject = FindRemovedCacheObject<T>();
84
+
85
+ if (cacheObject != null)
86
+ {
87
+ m_RemovedCacheObjects.Remove(cacheObject);
88
+ cacheObject.OnEnable();
89
+ }
90
+ else
91
+ {
92
+ cacheObject = CacheObject.Create<T>(this);
93
+ }
94
+
95
+ m_CacheObjects.Add(cacheObject);
96
+
97
+ cacheObject.OnCreate();
98
+
99
+ return cacheObject;
100
+ }
101
+
102
+ private T FindRemovedCacheObject<T>() where T : CacheObject
103
+ {
104
+ return m_RemovedCacheObjects.FirstOrDefault((o) => o.GetType().Equals(typeof(T))) as T;
105
+ }
106
+
107
+ public void Destroy(CacheObject cacheObject)
108
+ {
109
+ Debug.Assert(cacheObject != null);
110
+ Debug.Assert(cacheObject.owner == this);
111
+ Debug.Assert(m_CacheObjects.Contains(cacheObject));
112
+
113
+ m_CacheObjects.Remove(cacheObject);
114
+ m_RemovedCacheObjects.Add(cacheObject);
115
+
116
+ cacheObject.OnDestroy();
117
+ }
118
+
119
+ public void Destroy()
120
+ {
121
+ Debug.Assert(!m_CacheObjects.Contains(null));
122
+
123
+ EndUndoOperation();
124
+
125
+ undo.ClearUndo(this);
126
+
127
+ var cacheObjects = m_CacheObjects.ToArray();
128
+
129
+ foreach (var cacheObject in cacheObjects)
130
+ DestroyImmediate(cacheObject);
131
+
132
+ cacheObjects = m_RemovedCacheObjects.ToArray();
133
+
134
+ foreach (var cacheObject in cacheObjects)
135
+ DestroyImmediate(cacheObject);
136
+
137
+ m_CacheObjects.Clear();
138
+ m_RemovedCacheObjects.Clear();
139
+ }
140
+ }
141
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache/Cache.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 455f18c8a1cd7574f84ff7236cfaadea
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache/CacheObject.cs ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using UnityEngine;
3
+
4
+ namespace UnityEditor.U2D.Animation
5
+ {
6
+ internal class CacheObject : BaseObject, ISerializationCallbackReceiver
7
+ {
8
+ public static T Create<T>(Cache owner) where T : CacheObject
9
+ {
10
+ var cacheObject = CreateInstance<T>();
11
+ cacheObject.hideFlags = HideFlags.HideAndDontSave;
12
+ cacheObject.owner = owner;
13
+ return cacheObject;
14
+ }
15
+
16
+ [SerializeField]
17
+ private Cache m_Owner;
18
+
19
+ public Cache owner
20
+ {
21
+ get { return m_Owner; }
22
+ set { m_Owner = value; }
23
+ }
24
+
25
+ void ISerializationCallbackReceiver.OnAfterDeserialize()
26
+ {
27
+ OnAfterDeserialize();
28
+ }
29
+
30
+ void ISerializationCallbackReceiver.OnBeforeSerialize()
31
+ {
32
+ OnBeforeSerialize();
33
+ }
34
+
35
+ internal virtual void OnCreate() {}
36
+ protected virtual void OnAfterDeserialize() {}
37
+ protected virtual void OnBeforeSerialize() {}
38
+ }
39
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache/CacheObject.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: ea21de3798988c84dbc83021a3e6ecee
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CharacterModeTool/SwitchModeTool.cs ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+
3
+ namespace UnityEditor.U2D.Animation
4
+ {
5
+ internal class SwitchModeTool : BaseTool
6
+ {
7
+ protected override void OnActivate()
8
+ {
9
+ if (skinningCache.mode != SkinningMode.SpriteSheet)
10
+ {
11
+ skinningCache.mode = SkinningMode.SpriteSheet;
12
+ skinningCache.events.skinningModeChanged.Invoke(SkinningMode.SpriteSheet);
13
+ }
14
+ }
15
+
16
+ protected override void OnDeactivate()
17
+ {
18
+ if (skinningCache.mode != SkinningMode.Character)
19
+ {
20
+ skinningCache.mode = SkinningMode.Character;
21
+ skinningCache.events.skinningModeChanged.Invoke(SkinningMode.Character);
22
+ }
23
+ }
24
+ }
25
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CharacterModeTool/SwitchModeTool.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: daabb48969fe3724f80d2c96d89d710e
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/ICircleSelector.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 14aa89f96f565c749a282d699727c02c
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/IRectSelector.cs ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+
3
+ namespace UnityEditor.U2D.Animation
4
+ {
5
+ internal interface IRectSelector<T> : ISelector<T>
6
+ {
7
+ Rect rect { get; set; }
8
+ }
9
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/IRectSelector.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 84b178f994f5f114889b2ea8d042fcad
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/ISelector.cs ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections.Generic;
2
+
3
+ namespace UnityEditor.U2D.Animation
4
+ {
5
+ internal interface ISelector<T>
6
+ {
7
+ ISelection<T> selection { get; set; }
8
+
9
+ void Select();
10
+ }
11
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/ISelector.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 5bf608e7cb56c4f44b49044e0fc738ec
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/RectBoneSelector.cs ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using System.Collections.Generic;
3
+
4
+ namespace UnityEditor.U2D.Animation
5
+ {
6
+ internal class RectBoneSelector : IRectSelector<BoneCache>
7
+ {
8
+ public ISelection<BoneCache> selection { get; set; }
9
+ public BoneCache[] bones { get; set; }
10
+ public Rect rect { get; set; }
11
+
12
+ public void Select()
13
+ {
14
+ if (bones == null)
15
+ return;
16
+
17
+ foreach (var bone in bones)
18
+ {
19
+ if (!bone.isVisible)
20
+ continue;
21
+
22
+ Vector2 p1 = bone.position;
23
+ Vector2 p2 = bone.endPosition;
24
+ Vector2 point = Vector2.zero;
25
+ if (rect.Contains(p1, true) || rect.Contains(p2, true) ||
26
+ MathUtility.SegmentIntersection(new Vector2(rect.xMin, rect.yMin), new Vector2(rect.xMax, rect.yMin), p1, p2, ref point) ||
27
+ MathUtility.SegmentIntersection(new Vector2(rect.xMax, rect.yMin), new Vector2(rect.xMax, rect.yMax), p1, p2, ref point) ||
28
+ MathUtility.SegmentIntersection(new Vector2(rect.xMax, rect.yMax), new Vector2(rect.xMin, rect.yMax), p1, p2, ref point) ||
29
+ MathUtility.SegmentIntersection(new Vector2(rect.xMin, rect.yMax), new Vector2(rect.xMin, rect.yMin), p1, p2, ref point)
30
+ )
31
+ selection.Select(bone.ToCharacterIfNeeded(), true);
32
+ }
33
+ }
34
+ }
35
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/RectBoneSelector.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 831c95a008fa0fd478a97a3ea977d036
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/RectVertexSelector.cs ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using System.Collections.Generic;
3
+
4
+ namespace UnityEditor.U2D.Animation
5
+ {
6
+ internal class RectVertexSelector : IRectSelector<int>
7
+ {
8
+ public ISelection<int> selection { get; set; }
9
+ public ISpriteMeshData spriteMeshData { get; set; }
10
+ public Rect rect { get; set; }
11
+
12
+ public void Select()
13
+ {
14
+ for (int i = 0; i < spriteMeshData.vertexCount; i++)
15
+ {
16
+ if (rect.Contains(spriteMeshData.GetPosition(i), true))
17
+ selection.Select(i, true);
18
+ }
19
+ }
20
+ }
21
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/RectVertexSelector.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 35f5a927d239440c0a09f2ced66ba1f8
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/Unselector.cs ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+
3
+ namespace UnityEditor.U2D.Animation
4
+ {
5
+ internal class Unselector<T> : ISelector<T>
6
+ {
7
+ public ISelection<T> selection { get; set; }
8
+
9
+ public void Select()
10
+ {
11
+ selection.Clear();
12
+ }
13
+ }
14
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Selectors/Unselector.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: b276ded4b8314c24f801e98504841e79
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkeletonTool/SkeletonStyles.cs ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using System;
3
+
4
+ namespace UnityEditor.U2D.Animation
5
+ {
6
+ internal interface ISkeletonStyle
7
+ {
8
+ Color GetColor(BoneCache bone);
9
+ Color GetPreviewColor(int index);
10
+ Color GetParentLinkColor(BoneCache bone);
11
+ Color GetParentLinkPreviewColor(int index);
12
+ Color GetOutlineColor(BoneCache bone, bool isSelected, bool isHovered);
13
+ Color GetPreviewOutlineColor(int index);
14
+ float GetOutlineScale(bool isSelected);
15
+ }
16
+
17
+ internal abstract class SkeletonStyleBase : ISkeletonStyle
18
+ {
19
+ private const float kOutlineScale = 1.35f;
20
+ private const float kSelectedOutlineScale = 1.55f;
21
+
22
+ public Color GetColor(BoneCache bone)
23
+ {
24
+ return SetAlpha(GetBoneColorRaw(bone), GetAlpha(bone), VisibilityToolSettings.boneOpacity);
25
+ }
26
+
27
+ public Color GetPreviewColor(int index)
28
+ {
29
+ return GetBoneColorRaw(index);
30
+ }
31
+
32
+ public Color GetParentLinkColor(BoneCache bone)
33
+ {
34
+ return SetAlpha(GetBoneColorRaw(bone), 0.2f * GetAlpha(bone), VisibilityToolSettings.boneOpacity);
35
+ }
36
+
37
+ public Color GetParentLinkPreviewColor(int index)
38
+ {
39
+ return SetAlpha(GetBoneColorRaw(index), 0.2f, 1f);
40
+ }
41
+
42
+ public Color GetOutlineColor(BoneCache bone, bool isSelected, bool isHovered)
43
+ {
44
+ var skinningCache = bone.skinningCache;
45
+
46
+ if (isSelected)
47
+ return SelectionOutlineSettings.outlineColor;
48
+
49
+ if (isHovered)
50
+ return Handles.preselectionColor;
51
+
52
+ return SetAlpha(CalculateOutlineColor(GetBoneColorRaw(bone), VisibilityToolSettings.boneOpacity), GetAlpha(bone), VisibilityToolSettings.boneOpacity);
53
+ }
54
+
55
+ public Color GetPreviewOutlineColor(int index)
56
+ {
57
+ return CalculateOutlineColor(GetBoneColorRaw(index), 1f);
58
+ }
59
+
60
+ public float GetOutlineScale(bool isSelected)
61
+ {
62
+ if (isSelected)
63
+ return 1f + (kSelectedOutlineScale - 1f) * SelectionOutlineSettings.selectedBoneOutlineSize;
64
+
65
+ return kOutlineScale;
66
+ }
67
+
68
+ private Color CalculateOutlineColor(Color color, float opacity)
69
+ {
70
+ color *= 0.35f;
71
+ return SetAlpha(color, 0.75f, opacity);
72
+ }
73
+
74
+ private Color SetAlpha(Color color, float alpha, float opacity)
75
+ {
76
+ color.a = alpha * opacity;
77
+ return color;
78
+ }
79
+
80
+ protected virtual float GetAlpha(BoneCache bone)
81
+ {
82
+ return 1f;
83
+ }
84
+
85
+ protected abstract Color GetBoneColorRaw(BoneCache bone);
86
+ protected abstract Color GetBoneColorRaw(int index);
87
+ }
88
+
89
+ internal class BoneColorSkeletonStyle : SkeletonStyleBase
90
+ {
91
+ protected override Color GetBoneColorRaw(BoneCache bone)
92
+ {
93
+ return bone.bindPoseColor;
94
+ }
95
+
96
+ protected override Color GetBoneColorRaw(int index)
97
+ {
98
+ return ModuleUtility.CalculateNiceColor(index, 6);
99
+ }
100
+
101
+ protected override float GetAlpha(BoneCache bone)
102
+ {
103
+ return 0.9f;
104
+ }
105
+ }
106
+
107
+ internal class WeightmapSkeletonStyle : SkeletonStyleBase
108
+ {
109
+ protected override Color GetBoneColorRaw(BoneCache bone)
110
+ {
111
+ return bone.bindPoseColor;
112
+ }
113
+
114
+ protected override Color GetBoneColorRaw(int index)
115
+ {
116
+ return ModuleUtility.CalculateNiceColor(index, 6);
117
+ }
118
+
119
+ protected override float GetAlpha(BoneCache bone)
120
+ {
121
+ var skinningCache = bone.skinningCache;
122
+ var selectedSprite = skinningCache.selectedSprite;
123
+ var alpha = 0.9f;
124
+
125
+ if (skinningCache.mode == SkinningMode.Character && skinningCache.selectedSprite != null)
126
+ {
127
+ var characterPart = selectedSprite.GetCharacterPart();
128
+
129
+ if (characterPart.Contains(bone) == false)
130
+ alpha = 0.25f;
131
+ }
132
+
133
+ return alpha;
134
+ }
135
+ }
136
+
137
+ internal static class SkeletonStyles
138
+ {
139
+ public static readonly ISkeletonStyle Default = new BoneColorSkeletonStyle();
140
+ public static readonly ISkeletonStyle WeightMap = new WeightmapSkeletonStyle();
141
+ }
142
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkeletonTool/SkeletonStyles.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 7600825fd0008354ea24e17c94591a19
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: