- Fixed an issue where changing the order of actors in the animation was not being perpetuated across all animation stages
This commit is contained in:
AbstractConcept 2023-01-11 22:36:57 -06:00
parent b6d3df800d
commit ab53ed284f
46 changed files with 71 additions and 62 deletions

Binary file not shown.

View File

@ -8,7 +8,7 @@ namespace RimWorldAnimationStudio
public static class Constants
{
// Project data
public static string currentVersion = "1.0.2";
public static string currentVersion = "1.0.3";
public static string projectHome = "https://gitgud.io/AbstractConcept/rimworld-animation-studio";
public static string projectWiki = "https://gitgud.io/AbstractConcept/rimworld-animation-studio/-/wikis/home";

View File

@ -99,12 +99,16 @@ namespace RimWorldAnimationStudio
Workspace.animationDef.Actors[startIndex] = Workspace.animationDef.Actors[startIndex + delta];
Workspace.animationDef.Actors[startIndex + delta] = actor;
PawnAnimationClip clip = Workspace.GetPawnAnimationClip(startIndex);
Workspace.GetCurrentAnimationStage().AnimationClips[startIndex] = Workspace.GetCurrentAnimationStage().AnimationClips[startIndex + delta];
Workspace.GetCurrentAnimationStage().AnimationClips[startIndex + delta] = clip;
foreach (AnimationStage stage in Workspace.animationDef.animationStages)
{
int stageID = stage.GetStageID();
PawnAnimationClip clip = Workspace.GetPawnAnimationClip(stageID, startIndex);
Workspace.GetAnimationStage(stageID).AnimationClips[startIndex] = Workspace.GetAnimationStage(stageID).AnimationClips[startIndex + delta];
Workspace.GetAnimationStage(stageID).AnimationClips[startIndex + delta] = clip;
}
Workspace.ActorID = startIndex + delta;
Workspace.RecordEvent("Timeline move");
return true;

View File

@ -139,6 +139,11 @@ namespace RimWorldAnimationStudio
return animationDef?.AnimationStages.ElementAtOrDefault(stageID);
}
public static PawnAnimationClip GetPawnAnimationClip(int stageID, int actorID)
{
return GetAnimationStage(stageID)?.AnimationClips.ElementAtOrDefault(actorID);
}
public static PawnAnimationClip GetPawnAnimationClip(int actorID)
{
return GetCurrentAnimationStage()?.AnimationClips.ElementAtOrDefault(actorID);

Binary file not shown.

View File

@ -21,7 +21,7 @@ MonoBehaviour:
m_ShowMode: 4
m_Title:
m_RootView: {fileID: 2}
m_MinSize: {x: 875, y: 371}
m_MinSize: {x: 875, y: 542}
m_MaxSize: {x: 10000, y: 10000}
m_Maximized: 1
--- !u!114 &2
@ -46,7 +46,7 @@ MonoBehaviour:
y: 0
width: 1920
height: 997
m_MinSize: {x: 875, y: 371}
m_MinSize: {x: 875, y: 542}
m_MaxSize: {x: 10000, y: 10000}
--- !u!114 &3
MonoBehaviour:
@ -112,10 +112,10 @@ MonoBehaviour:
y: 30
width: 1920
height: 947
m_MinSize: {x: 677, y: 321}
m_MaxSize: {x: 12002, y: 8021}
m_MinSize: {x: 677, y: 492}
m_MaxSize: {x: 14001, y: 14042}
vertical: 0
controlID: 3922
controlID: 1183
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
@ -137,10 +137,10 @@ MonoBehaviour:
y: 0
width: 1414
height: 947
m_MinSize: {x: 402, y: 321}
m_MaxSize: {x: 8002, y: 8021}
m_MinSize: {x: 402, y: 492}
m_MaxSize: {x: 10001, y: 14042}
vertical: 1
controlID: 3923
controlID: 1184
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
@ -165,7 +165,7 @@ MonoBehaviour:
m_MinSize: {x: 402, y: 221}
m_MaxSize: {x: 8002, y: 4021}
vertical: 0
controlID: 3924
controlID: 1185
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
@ -231,7 +231,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: ConsoleWindow
m_Name: ProjectBrowser
m_EditorClassIdentifier:
m_Children: []
m_Position:
@ -240,15 +240,15 @@ MonoBehaviour:
y: 671
width: 1414
height: 276
m_MinSize: {x: 101, y: 121}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 18}
m_MinSize: {x: 231, y: 271}
m_MaxSize: {x: 10001, y: 10021}
m_ActualView: {fileID: 17}
m_Panes:
- {fileID: 17}
- {fileID: 18}
- {fileID: 19}
m_Selected: 1
m_LastSelected: 0
m_Selected: 0
m_LastSelected: 1
--- !u!114 &11
MonoBehaviour:
m_ObjectHideFlags: 52
@ -398,7 +398,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: c423ffffd823ffffda23ffff8025ffff9425ffff3a26ffff562fffff6a2fffff6c2fffffe82ffffffc2ffffffe2fffffe432fffff832ffff9e33ffff62fbffff103d0000223d0000a43d0000523e00000e430000a2460000d646000066e8000078e800001ee90000d8e90000d0ef00002ef400006af400007030010022370100da67010092680100706d0100446f0100946f0100de730100f0c20100a2c90100f2c90100
m_ExpandedIDs: 3ef8feff52f8fefff8f8feff62fbffff
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -458,9 +458,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: 507.95483, y: 270.6315, z: -252.25}
m_Target: {x: 632.8636, y: 316.5322, z: -264.26733}
speed: 2
m_Value: {x: 507.95483, y: 270.6315, z: -252.25}
m_Value: {x: 557.8876, y: 330.72833, z: -128.25}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@ -510,9 +510,9 @@ MonoBehaviour:
speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 284.62003
m_Target: 404.75827
speed: 2
m_Value: 298.03143
m_Value: 302.3116
m_Ortho:
m_Target: 1
speed: 2
@ -1115,9 +1115,9 @@ MonoBehaviour:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 41}
m_SelectedIDs: 7c4e0000
m_LastClickedID: 20092
m_ExpandedIDs: 00000000cc4e0000ce4e0000d04e0000d24e0000d44e0000d64e0000d84e0000da4e0000dc4e0000de4e0000
m_SelectedIDs: d84e0000
m_LastClickedID: 20184
m_ExpandedIDs: 00000000cc4e0000ce4e0000d04e0000d24e0000d44e0000d64e0000d84e0000da4e0000dc4e0000de4e000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1145,7 +1145,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000cc4e0000ce4e0000d04e0000d24e0000d44e0000d64e0000d84e0000da4e0000dc4e0000de4e0000
m_ExpandedIDs: 00000000cc4e0000ce4e0000d04e0000d24e0000d44e0000d64e0000d84e0000da4e0000dc4e0000de4e000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1197,7 +1197,7 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_NewAssetIndexInList: -1
m_ScrollPosition: {x: 0, y: 5}
m_ScrollPosition: {x: 0, y: 0}
m_GridSize: 67
m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 379
@ -1295,4 +1295,4 @@ MonoBehaviour:
m_PrefName: Preview_InspectorPreview
m_PreviewWindow: {fileID: 0}
m_LastInspectedObjectInstanceID: -1
m_LastVerticalScrollValue: 0
m_LastVerticalScrollValue: 100

View File

@ -21,10 +21,10 @@ MonoBehaviour:
y: 30
width: 1920
height: 947
m_MinSize: {x: 677, y: 321}
m_MaxSize: {x: 12002, y: 8021}
m_MinSize: {x: 677, y: 492}
m_MaxSize: {x: 14001, y: 14042}
vertical: 0
controlID: 1006
controlID: 1015
--- !u!114 &2
MonoBehaviour:
m_ObjectHideFlags: 52
@ -138,10 +138,10 @@ MonoBehaviour:
y: 0
width: 1414
height: 947
m_MinSize: {x: 402, y: 321}
m_MaxSize: {x: 8002, y: 8021}
m_MinSize: {x: 402, y: 492}
m_MaxSize: {x: 10001, y: 14042}
vertical: 1
controlID: 1007
controlID: 1016
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
@ -166,7 +166,7 @@ MonoBehaviour:
m_MinSize: {x: 402, y: 221}
m_MaxSize: {x: 8002, y: 4021}
vertical: 0
controlID: 1008
controlID: 1017
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
@ -224,7 +224,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 562fffff6a2fffff6c2fffffe82ffffffc2ffffffe2fffffe432fffff832ffff9e33ffff62fbffff103d0000223d0000a43d0000523e00000e430000a2460000d646000066e8000078e800001ee90000d8e90000d0ef00002ef400006af40000703001002237010092680100706d0100446f0100946f0100
m_ExpandedIDs: 38d1ffff44d1ffff8c4f0000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -306,16 +306,16 @@ MonoBehaviour:
m_ShowContextualTools: 0
m_WindowGUID: 352ee9c972596684b9fdf9db32bf21bf
m_Gizmos: 0
m_SceneIsLit: 1
m_SceneIsLit: 0
m_SceneLighting: 1
m_2DMode: 1
m_isRotationLocked: 0
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: 336.24997, y: 300.388, z: -236.90625}
m_Target: {x: 557.8876, y: 330.72833, z: -128.25}
speed: 2
m_Value: {x: 336.24997, y: 300.388, z: -236.90625}
m_Value: {x: 557.8876, y: 330.72833, z: -128.25}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@ -328,7 +328,7 @@ MonoBehaviour:
m_SceneViewState:
showFog: 1
showMaterialUpdate: 0
showSkybox: 1
showSkybox: 0
showFlares: 1
showImageEffects: 1
showParticleSystems: 1
@ -365,9 +365,9 @@ MonoBehaviour:
speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 263.2901
m_Target: 302.3116
speed: 2
m_Value: 263.2901
m_Value: 302.3116
m_Ortho:
m_Target: 1
speed: 2
@ -930,7 +930,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: ConsoleWindow
m_Name: ProjectBrowser
m_EditorClassIdentifier:
m_Children: []
m_Position:
@ -939,15 +939,15 @@ MonoBehaviour:
y: 671
width: 1414
height: 276
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 13}
m_MinSize: {x: 231, y: 271}
m_MaxSize: {x: 10001, y: 10021}
m_ActualView: {fileID: 12}
m_Panes:
- {fileID: 12}
- {fileID: 13}
- {fileID: 14}
m_Selected: 1
m_LastSelected: 0
m_Selected: 0
m_LastSelected: 1
--- !u!114 &12
MonoBehaviour:
m_ObjectHideFlags: 52
@ -998,9 +998,9 @@ MonoBehaviour:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 41}
m_SelectedIDs: 7c4e0000
m_LastClickedID: 20092
m_ExpandedIDs: 00000000cc4e0000ce4e0000d04e0000d24e0000d44e0000d64e0000d84e0000da4e0000dc4e0000de4e0000
m_SelectedIDs: d84e0000
m_LastClickedID: 20184
m_ExpandedIDs: 00000000cc4e0000ce4e0000d04e0000d24e0000d44e0000d64e0000d84e0000da4e0000dc4e0000de4e000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1028,7 +1028,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000cc4e0000ce4e0000d04e0000d24e0000d44e0000d64e0000d84e0000da4e0000dc4e0000de4e0000
m_ExpandedIDs: 00000000cc4e0000ce4e0000d04e0000d24e0000d44e0000d64e0000d84e0000da4e0000dc4e0000de4e000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1053,8 +1053,8 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_ListAreaState:
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_SelectedInstanceIDs: 944f0000
m_LastClickedInstanceID: 20372
m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c6230000303a0000063a0000a83d00005c66000000870000f8860000004a00004a4600000c430000004900007e9800000249000086980000000000007a140100
m_RenameOverlay:
@ -1080,7 +1080,7 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_NewAssetIndexInList: -1
m_ScrollPosition: {x: 0, y: 5}
m_ScrollPosition: {x: 0, y: 0}
m_GridSize: 67
m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 379
@ -1203,5 +1203,5 @@ MonoBehaviour:
m_ControlHash: -371814159
m_PrefName: Preview_InspectorPreview
m_PreviewWindow: {fileID: 0}
m_LastInspectedObjectInstanceID: 94100
m_LastVerticalScrollValue: 0
m_LastInspectedObjectInstanceID: 20372
m_LastVerticalScrollValue: 100

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
{"m_ExpandedPrefabGameObjectFileIDs":[3541467645058788217],"m_ExpandedSceneGameObjectInstanceIDs":[],"m_ScrollY":0.0,"m_LastClickedFileID":8349152464423077224,"m_LastClickedInstanceID":0}
{"m_ExpandedPrefabGameObjectFileIDs":[3541467645058788217],"m_ExpandedSceneGameObjectInstanceIDs":[],"m_ScrollY":0.0,"m_LastClickedFileID":3541467645058788217,"m_LastClickedInstanceID":0}

View File

@ -1 +1 @@
{"cameraMode":{"drawMode":0,"name":"Shaded","section":"Shading Mode"},"sceneLighting":true,"audioPlay":false,"sceneViewState":{"showFog":true,"showMaterialUpdate":false,"showSkybox":true,"showFlares":true,"showImageEffects":true,"showParticleSystems":true},"in2DMode":true,"pivot":{"x":507.954833984375,"y":270.6315002441406,"z":-252.25},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0},"size":284.6200256347656,"orthographic":true}
{"cameraMode":{"drawMode":0,"name":"Shaded","section":"Shading Mode"},"sceneLighting":true,"audioPlay":false,"sceneViewState":{"showFog":true,"showMaterialUpdate":false,"showSkybox":true,"showFlares":true,"showImageEffects":true,"showParticleSystems":true},"in2DMode":true,"pivot":{"x":632.8635864257813,"y":316.5321960449219,"z":-264.267333984375},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0},"size":404.7582702636719,"orthographic":true}

BIN
preview1.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB