mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Basic keybinds plus multi key selection
This commit is contained in:
parent
518a912ef1
commit
842c954455
89 changed files with 977 additions and 164 deletions
|
@ -275,6 +275,84 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 11575765}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &28901883
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 28901884}
|
||||
- component: {fileID: 28901886}
|
||||
- component: {fileID: 28901885}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &28901884
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 28901883}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1673590781}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &28901885
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 28901883}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Cancel
|
||||
--- !u!222 &28901886
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 28901883}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &40775274
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -629,7 +707,7 @@ RectTransform:
|
|||
- {fileID: 1302075273}
|
||||
- {fileID: 1849536740}
|
||||
m_Father: {fileID: 682235885}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -2117,6 +2195,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
exitDialog: {fileID: 1588340716}
|
||||
newAnimationDialog: {fileID: 1717923583}
|
||||
selectAnimationDialog: {fileID: 56207934}
|
||||
--- !u!1 &219230437
|
||||
GameObject:
|
||||
|
@ -5908,7 +5987,7 @@ MonoBehaviour:
|
|||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 168629124}
|
||||
m_MethodName: TrySaveAnimation
|
||||
m_MethodName: TryToSaveAnimation
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
|
@ -6309,7 +6388,7 @@ MonoBehaviour:
|
|||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 168629124}
|
||||
m_MethodName: NewAnimation
|
||||
m_MethodName: TryToMakeNewAnimation
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
|
@ -9130,6 +9209,87 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 671921653}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &675100305
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 675100306}
|
||||
- component: {fileID: 675100308}
|
||||
- component: {fileID: 675100307}
|
||||
m_Layer: 5
|
||||
m_Name: WarningText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &675100306
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 675100305}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1717923582}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 20}
|
||||
m_SizeDelta: {x: 330.00006, y: 90}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &675100307
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 675100305}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 20
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 1
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 'Create a new animation?
|
||||
|
||||
|
||||
All unsaved changes will be lost'
|
||||
--- !u!222 &675100308
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 675100305}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &682235884
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -9160,6 +9320,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1588340713}
|
||||
- {fileID: 1717923582}
|
||||
- {fileID: 56207931}
|
||||
- {fileID: 1969226734}
|
||||
- {fileID: 685077909}
|
||||
|
@ -9405,7 +9566,7 @@ RectTransform:
|
|||
- {fileID: 371198550}
|
||||
- {fileID: 77649836}
|
||||
m_Father: {fileID: 682235885}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -12175,7 +12336,7 @@ PrefabInstance:
|
|||
- target: {fileID: 7715503544296011585, guid: 8b89f6c9e5f696c4997760829c45a505,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 8
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7715503544296011585, guid: 8b89f6c9e5f696c4997760829c45a505,
|
||||
type: 3}
|
||||
|
@ -13263,7 +13424,7 @@ RectTransform:
|
|||
- {fileID: 347034222}
|
||||
- {fileID: 932977622}
|
||||
m_Father: {fileID: 682235885}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -15220,7 +15381,7 @@ PrefabInstance:
|
|||
- target: {fileID: 7715503544296011585, guid: 8b89f6c9e5f696c4997760829c45a505,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 6
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7715503544296011585, guid: 8b89f6c9e5f696c4997760829c45a505,
|
||||
type: 3}
|
||||
|
@ -16703,6 +16864,7 @@ GameObject:
|
|||
- component: {fileID: 1335076901}
|
||||
- component: {fileID: 1335076900}
|
||||
- component: {fileID: 1335076904}
|
||||
- component: {fileID: 1335076905}
|
||||
m_Layer: 5
|
||||
m_Name: Workspace
|
||||
m_TagString: Untagged
|
||||
|
@ -16807,6 +16969,18 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
workspaceHistory: []
|
||||
maxHistoryDepth: 100
|
||||
--- !u!114 &1335076905
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1335076899}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 120c040fa90da65478716f3ccda1248f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1344070787
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -19873,6 +20047,80 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1489591897}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1493764522
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1493764523}
|
||||
- component: {fileID: 1493764525}
|
||||
- component: {fileID: 1493764524}
|
||||
m_Layer: 5
|
||||
m_Name: BackSpalsh
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1493764523
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1493764522}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1717923582}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 330, y: 150}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1493764524
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1493764522}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1493764525
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1493764522}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1502398120
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -22688,6 +22936,136 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1671366298}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1673590780
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1673590781}
|
||||
- component: {fileID: 1673590784}
|
||||
- component: {fileID: 1673590783}
|
||||
- component: {fileID: 1673590782}
|
||||
m_Layer: 5
|
||||
m_Name: CancelButton
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1673590781
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1673590780}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 28901884}
|
||||
m_Father: {fileID: 1717923582}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 90, y: -45}
|
||||
m_SizeDelta: {x: 120, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1673590782
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1673590780}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 1673590783}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1717923581}
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &1673590783
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1673590780}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1673590784
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1673590780}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1676585153
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -22931,6 +23309,98 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1697817321}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1717923581
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1717923582}
|
||||
- component: {fileID: 1717923585}
|
||||
- component: {fileID: 1717923584}
|
||||
- component: {fileID: 1717923583}
|
||||
m_Layer: 5
|
||||
m_Name: NewAnimationDialog
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1717923582
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1717923581}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1493764523}
|
||||
- {fileID: 1805611459}
|
||||
- {fileID: 1673590781}
|
||||
- {fileID: 675100306}
|
||||
m_Father: {fileID: 682235885}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1717923583
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1717923581}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5a554bad525e79e4fb3dea0d391daf48, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
cloneObjects: []
|
||||
--- !u!114 &1717923584
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1717923581}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.392}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1717923585
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1717923581}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1719111567
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -24130,6 +24600,225 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1798757603}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1805611458
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1805611459}
|
||||
- component: {fileID: 1805611462}
|
||||
- component: {fileID: 1805611461}
|
||||
- component: {fileID: 1805611460}
|
||||
m_Layer: 5
|
||||
m_Name: OKButton
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1805611459
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1805611458}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1808559463}
|
||||
m_Father: {fileID: 1717923582}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -90, y: -45}
|
||||
m_SizeDelta: {x: 120, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1805611460
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1805611458}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 1805611461}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 168629124}
|
||||
m_MethodName: NewAnimation
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
- m_Target: {fileID: 1717923583}
|
||||
m_MethodName: Pop
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &1805611461
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1805611458}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1805611462
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1805611458}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1808559462
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1808559463}
|
||||
- component: {fileID: 1808559465}
|
||||
- component: {fileID: 1808559464}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1808559463
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1808559462}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1805611459}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1808559464
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1808559462}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: OK
|
||||
--- !u!222 &1808559465
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1808559462}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1811894048
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -25708,7 +26397,7 @@ RectTransform:
|
|||
- {fileID: 1543793723}
|
||||
- {fileID: 1344070788}
|
||||
m_Father: {fileID: 682235885}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -26063,7 +26752,7 @@ RectTransform:
|
|||
- {fileID: 1481521047}
|
||||
- {fileID: 1261535758}
|
||||
m_Father: {fileID: 682235885}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -31524,7 +32213,7 @@ RectTransform:
|
|||
- {fileID: 631515291}
|
||||
- {fileID: 3579074259096323583}
|
||||
m_Father: {fileID: 682235885}
|
||||
m_RootOrder: 9
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -32288,7 +32977,7 @@ PrefabInstance:
|
|||
- target: {fileID: 7715503544296011585, guid: 8b89f6c9e5f696c4997760829c45a505,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 7
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7715503544296011585, guid: 8b89f6c9e5f696c4997760829c45a505,
|
||||
type: 3}
|
||||
|
|
|
@ -95,7 +95,12 @@ namespace RimWorldAnimationStudio
|
|||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
Workspace.actorID = actorID;
|
||||
Workspace.keyframeID = keyframeID;
|
||||
|
||||
if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand))
|
||||
{ Workspace.keyframeID.Add(keyframeID); }
|
||||
|
||||
else
|
||||
{ Workspace.keyframeID = new List<int> { keyframeID }; }
|
||||
|
||||
if (eventData.clickCount >= 2)
|
||||
{ AnimationController.Instance.stageTick = keyframe.atTick.Value; }
|
||||
|
@ -107,7 +112,8 @@ namespace RimWorldAnimationStudio
|
|||
{
|
||||
//AnimationController.Instance.stageTick = keyframe.atTick.Value;
|
||||
Workspace.actorID = actorID;
|
||||
Workspace.keyframeID = keyframeID;
|
||||
|
||||
Workspace.keyframeID = new List<int> { keyframeID };
|
||||
|
||||
dragTimeStart = Time.unscaledTime;
|
||||
}
|
||||
|
@ -132,17 +138,17 @@ namespace RimWorldAnimationStudio
|
|||
{ value = 1; return; }
|
||||
|
||||
interactable = false;
|
||||
Workspace.Instance.RecordEvent("Keyframe tick");
|
||||
Workspace.Instance.RecordEvent("Keyframe move");
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (keyframe.atTick.HasValue && Workspace.keyframeID == keyframeID && AnimationController.Instance.stageTick == keyframe.atTick.Value)
|
||||
if (keyframe.atTick.HasValue && Workspace.keyframeID.Contains(keyframeID) && AnimationController.Instance.stageTick == keyframe.atTick.Value)
|
||||
{ handleImage.color = Constants.ColorPurple; }
|
||||
|
||||
else if (Workspace.keyframeID == keyframeID)
|
||||
else if (Workspace.keyframeID.Contains(keyframeID))
|
||||
{ handleImage.color = Constants.ColorCyan; }
|
||||
|
||||
else if (keyframe.atTick.HasValue && AnimationController.Instance.stageTick == keyframe.atTick.Value)
|
||||
|
|
|
@ -132,10 +132,10 @@ namespace RimWorldAnimationStudio
|
|||
for (int actorID = 0; actorID < _actorBodies.Count; actorID++)
|
||||
{
|
||||
if (Workspace.stageID >= Workspace.animationDef?.animationStages.Count)
|
||||
{ Debug.Log("Waiting for animation stage data to initialize..."); return; }
|
||||
{ /*Debug.Log("Waiting for animation stage data to initialize...");*/ return; }
|
||||
|
||||
if (actorID >= Workspace.animationDef?.animationStages[Workspace.stageID]?.animationClips.Count)
|
||||
{ Debug.Log("Waiting for animation clip data to initialize..."); return; }
|
||||
{ /*Debug.Log("Waiting for animation clip data to initialize...");*/ return; }
|
||||
|
||||
Actor actor = Workspace.animationDef.actors[actorID];
|
||||
PawnAnimationClip clip = Workspace.animationDef?.animationStages[Workspace.stageID]?.animationClips[actorID];
|
||||
|
@ -340,39 +340,45 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public void ClonePawnKeyframe()
|
||||
{
|
||||
PawnAnimationClip clip = Workspace.Instance.GetCurrentPawnAnimationClip();
|
||||
List<PawnKeyframe> keyframes = clip?.keyframes;
|
||||
PawnKeyframe keyframe = Workspace.Instance.GetPawnKeyframe(Workspace.actorID, Workspace.keyframeID);
|
||||
List<PawnKeyframe> keyframesToClone = Workspace.Instance.GetPawnKeyframes(Workspace.keyframeID);
|
||||
|
||||
if (clip == null || keyframes == null)
|
||||
{ Debug.LogWarning("Cannot clone pawn keyframe - the AnimationDef is invalid"); return; }
|
||||
foreach (PawnKeyframe keyframe in keyframesToClone)
|
||||
{
|
||||
PawnAnimationClip clip = Workspace.Instance.GetAnimationClipThatOwnsKeyframe(keyframe.keyframeID, out int clipID);
|
||||
|
||||
if (keyframes.FirstOrDefault(x => x.atTick == stageTick) != null)
|
||||
{ Debug.LogWarning("Cannot clone pawn keyframe - a keyframe already exists at this tick"); return; }
|
||||
if (clip == null)
|
||||
{ Debug.LogWarning("Cannot clone pawn keyframe - no clip owns this keyframe"); continue; }
|
||||
|
||||
if (keyframe == null)
|
||||
{ Debug.LogWarning("Cannot clone pawn keyframe - no keyframe has been selected for cloning"); return; }
|
||||
if (clip.keyframes.FirstOrDefault(x => x.atTick == stageTick) != null)
|
||||
{ Debug.LogWarning("Cannot clone pawn keyframe - a keyframe already exists at this tick"); return; }
|
||||
|
||||
PawnKeyframe cloneFrame = keyframe.Copy();
|
||||
cloneFrame.GenerateKeyframeID();
|
||||
cloneFrame.atTick = stageTick;
|
||||
PawnKeyframe cloneFrame = keyframe.Copy();
|
||||
cloneFrame.GenerateKeyframeID();
|
||||
cloneFrame.atTick = stageTick;
|
||||
|
||||
PawnKeyframe nextKeyframe = keyframes.FirstOrDefault(x => x.atTick > stageTick);
|
||||
PawnKeyframe nextKeyframe = clip.keyframes.FirstOrDefault(x => x.atTick > stageTick);
|
||||
|
||||
if (nextKeyframe != null)
|
||||
{ keyframes.Insert(keyframes.IndexOf(nextKeyframe), cloneFrame); }
|
||||
if (nextKeyframe != null)
|
||||
{ clip.keyframes.Insert(clip.keyframes.IndexOf(nextKeyframe), cloneFrame); }
|
||||
|
||||
else
|
||||
{ keyframes.Add(cloneFrame); }
|
||||
else
|
||||
{ clip.keyframes.Add(cloneFrame); }
|
||||
|
||||
clip.BuildSimpleCurves();
|
||||
clip.BuildSimpleCurves();
|
||||
|
||||
animationTimelines.GetComponentsInChildren<AnimationTimeline>()[Workspace.actorID].AddPawnKeyFrame(cloneFrame.keyframeID);
|
||||
animationTimelines.GetComponentsInChildren<AnimationTimeline>()[clipID].AddPawnKeyFrame(cloneFrame.keyframeID);
|
||||
}
|
||||
|
||||
Workspace.Instance.RecordEvent("Keyframe clone");
|
||||
}
|
||||
|
||||
public void RemovePawnKeyframe()
|
||||
{
|
||||
RemovePawnKeyframe(Workspace.actorID, Workspace.keyframeID);
|
||||
foreach (int keyframeID in Workspace.keyframeID)
|
||||
{
|
||||
if (Workspace.Instance.GetAnimationClipThatOwnsKeyframe(keyframeID, out int clipID) != null)
|
||||
{ RemovePawnKeyframe(clipID, keyframeID); }
|
||||
}
|
||||
}
|
||||
|
||||
public void RemovePawnKeyframe(int actorID, int keyframeID)
|
||||
|
@ -388,7 +394,7 @@ namespace RimWorldAnimationStudio
|
|||
if (clip.keyframes.Count <= 2)
|
||||
{ Debug.LogWarning("Cannot delete key frame - an animation clip must have two or more keyframes"); return; }
|
||||
|
||||
animationTimelines.GetComponentsInChildren<AnimationTimeline>()[Workspace.actorID].RemovePawnKeyFrame(keyframe.keyframeID);
|
||||
animationTimelines.GetComponentsInChildren<AnimationTimeline>()[actorID].RemovePawnKeyFrame(keyframe.keyframeID);
|
||||
|
||||
clip.keyframes.Remove(keyframe);
|
||||
clip.BuildSimpleCurves();
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace RimWorldAnimationStudio
|
|||
public class ApplicationManager : Singleton<ApplicationManager>
|
||||
{
|
||||
public DialogBox exitDialog;
|
||||
public DialogBox newAnimationDialog;
|
||||
public SelectAnimationDialog selectAnimationDialog;
|
||||
|
||||
public void Start()
|
||||
|
@ -74,7 +75,7 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
}
|
||||
|
||||
public void TrySaveAnimation()
|
||||
public void TryToSaveAnimation()
|
||||
{
|
||||
if (Workspace.animationDef == null)
|
||||
{ return; }
|
||||
|
@ -121,6 +122,14 @@ namespace RimWorldAnimationStudio
|
|||
}
|
||||
}
|
||||
|
||||
public void TryToMakeNewAnimation()
|
||||
{
|
||||
if (Workspace.animationDef == null)
|
||||
{ NewAnimation(); return; }
|
||||
|
||||
newAnimationDialog.Pop();
|
||||
}
|
||||
|
||||
public void NewAnimation()
|
||||
{
|
||||
var path = Path.Combine(Application.streamingAssetsPath, "AnimationDefs/newAnimationDef.xml");
|
||||
|
|
42
Assets/Scripts/Managers/InputManager.cs
Normal file
42
Assets/Scripts/Managers/InputManager.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RimWorldAnimationStudio
|
||||
{
|
||||
public class InputManager : Singleton<InputManager>
|
||||
{
|
||||
public void Update()
|
||||
{
|
||||
if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.Z))
|
||||
{ Workspace.Instance.Undo(); }
|
||||
|
||||
else if (Input.GetKey(KeyCode.LeftCommand) && Input.GetKeyDown(KeyCode.Z))
|
||||
{ Workspace.Instance.Undo(); }
|
||||
|
||||
else if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.Y))
|
||||
{ Workspace.Instance.Redo(); }
|
||||
|
||||
else if (Input.GetKey(KeyCode.LeftCommand) && Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.Z))
|
||||
{ Workspace.Instance.Redo(); }
|
||||
|
||||
else if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand)) && Input.GetKeyDown(KeyCode.C))
|
||||
{ AnimationController.Instance.ClonePawnKeyframe(); }
|
||||
|
||||
else if (Input.GetKey(KeyCode.Backspace) || Input.GetKey(KeyCode.Delete))
|
||||
{ AnimationController.Instance.RemovePawnKeyframe(); }
|
||||
|
||||
else if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand)) && Input.GetKeyDown(KeyCode.N))
|
||||
{ ApplicationManager.Instance.TryToMakeNewAnimation(); }
|
||||
|
||||
else if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand)) && Input.GetKeyDown(KeyCode.S))
|
||||
{ ApplicationManager.Instance.TryToSaveAnimation(); }
|
||||
|
||||
else if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand)) && Input.GetKeyDown(KeyCode.L))
|
||||
{ ApplicationManager.Instance.TryToLoadAnimation(); }
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/Managers/InputManager.cs.meta
Normal file
11
Assets/Scripts/Managers/InputManager.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 120c040fa90da65478716f3ccda1248f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -13,14 +13,14 @@ namespace RimWorldAnimationStudio
|
|||
{
|
||||
public static T ReadXML<T>(string path)
|
||||
{
|
||||
Debug.Log("Reading data from " + path);
|
||||
//Debug.Log("Reading data from " + path);
|
||||
|
||||
using (StreamReader stringReader = new StreamReader(path))
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(T));
|
||||
var data = (T)serializer.Deserialize(stringReader);
|
||||
|
||||
Debug.Log("Read successful");
|
||||
//Debug.Log("Read successful");
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ namespace RimWorldAnimationStudio
|
|||
if (obj == null || path == null || path == "")
|
||||
{ return; }
|
||||
|
||||
Debug.Log("Saving data to " + path);
|
||||
//Debug.Log("Saving data to " + path);
|
||||
|
||||
XmlSerializer writer = new XmlSerializer(typeof(T));
|
||||
XmlSerializerNamespaces nameSpaces = new XmlSerializerNamespaces();
|
||||
|
@ -40,7 +40,7 @@ namespace RimWorldAnimationStudio
|
|||
writer.Serialize(file, obj, nameSpaces);
|
||||
file.Close();
|
||||
|
||||
Debug.Log("Saving successful");
|
||||
//Debug.Log("Saving successful");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace RimWorldAnimationStudio
|
|||
public static AnimationDef animationDef;
|
||||
public static int stageID = 0;
|
||||
|
||||
public static int keyframeID = 0;
|
||||
public static List<int> keyframeID = new List<int>();
|
||||
|
||||
[SerializeField] private List<HistoricRecord> workspaceHistory = new List<HistoricRecord>();
|
||||
[SerializeField] private int maxHistoryDepth = 100;
|
||||
|
@ -61,9 +61,49 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public PawnKeyframe GetPawnKeyframe(int actorID, int keyframeID)
|
||||
{
|
||||
if (stageID < 0) return null;
|
||||
if (actorID < 0) return null;
|
||||
|
||||
if (stageID >= animationDef.animationStages.Count) return null;
|
||||
if (actorID >= animationDef.animationStages[stageID].animationClips.Count) return null;
|
||||
|
||||
return animationDef.animationStages[stageID].animationClips[actorID].keyframes.FirstOrDefault(x => x.keyframeID == keyframeID);
|
||||
}
|
||||
|
||||
public List<PawnKeyframe> GetPawnKeyframes(List<int> keyframeIDs)
|
||||
{
|
||||
List<PawnKeyframe> pawnKeyframes = new List<PawnKeyframe>();
|
||||
|
||||
foreach (PawnAnimationClip clip in animationDef.animationStages[stageID].animationClips)
|
||||
{
|
||||
foreach (PawnKeyframe keyframe in clip.keyframes)
|
||||
{
|
||||
if (keyframeIDs.Contains(keyframe.keyframeID))
|
||||
{ pawnKeyframes.Add(keyframe); }
|
||||
}
|
||||
}
|
||||
|
||||
return pawnKeyframes;
|
||||
}
|
||||
|
||||
public PawnAnimationClip GetAnimationClipThatOwnsKeyframe(int keyframeID, out int clipID)
|
||||
{
|
||||
clipID = -1;
|
||||
|
||||
for (int i = 0; i < animationDef.animationStages[stageID].animationClips.Count; i++)
|
||||
{
|
||||
PawnAnimationClip clip = animationDef.animationStages[stageID].animationClips[i];
|
||||
|
||||
if (clip.keyframes.Any(x => x.keyframeID == keyframeID))
|
||||
{
|
||||
clipID = i;
|
||||
return clip;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
public LinkedList<HistoricRecord> pastSnapshots = new LinkedList<HistoricRecord>();
|
||||
public LinkedList<HistoricRecord> futureSnapshots = new LinkedList<HistoricRecord>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue