mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Initial commit
This commit is contained in:
commit
3c7cc0c973
8391 changed files with 704313 additions and 0 deletions
|
@ -0,0 +1,8 @@
|
|||
namespace UnityEditor.Timeline
|
||||
{
|
||||
enum TimeReferenceMode
|
||||
{
|
||||
Local = 0,
|
||||
Global = 1
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 34d6f60b171c1004e8335d52c65928a3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,42 @@
|
|||
namespace UnityEditor.Timeline
|
||||
{
|
||||
class TimelineActiveMode : TimelineMode
|
||||
{
|
||||
public TimelineActiveMode()
|
||||
{
|
||||
headerState = new HeaderState
|
||||
{
|
||||
breadCrumb = TimelineModeGUIState.Enabled,
|
||||
options = TimelineModeGUIState.Enabled,
|
||||
sequenceSelector = TimelineModeGUIState.Enabled
|
||||
};
|
||||
|
||||
trackOptionsState = new TrackOptionsState
|
||||
{
|
||||
newButton = TimelineModeGUIState.Enabled,
|
||||
editAsAssetButton = TimelineModeGUIState.Hidden
|
||||
};
|
||||
mode = TimelineModes.Active;
|
||||
}
|
||||
|
||||
public override bool ShouldShowTimeCursor(WindowState state)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool ShouldShowPlayRange(WindowState state)
|
||||
{
|
||||
return state.playRangeEnabled;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState ToolbarState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Enabled;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState TrackState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Enabled;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 67ee43b2f6148de40861b289b0e00591
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,27 @@
|
|||
namespace UnityEditor.Timeline
|
||||
{
|
||||
class TimelineAssetEditionMode : TimelineInactiveMode
|
||||
{
|
||||
public override TimelineModeGUIState TrackState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Enabled;
|
||||
}
|
||||
|
||||
public TimelineAssetEditionMode()
|
||||
{
|
||||
headerState = new HeaderState
|
||||
{
|
||||
breadCrumb = TimelineModeGUIState.Enabled,
|
||||
options = TimelineModeGUIState.Enabled,
|
||||
sequenceSelector = TimelineModeGUIState.Enabled
|
||||
};
|
||||
|
||||
trackOptionsState = new TrackOptionsState
|
||||
{
|
||||
newButton = TimelineModeGUIState.Enabled,
|
||||
editAsAssetButton = TimelineModeGUIState.Enabled
|
||||
};
|
||||
mode = TimelineModes.AssetEdition;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3477d28057cb3e4469c7ea6b8dc23046
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,44 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.Timeline
|
||||
{
|
||||
class TimelineDisabledMode : TimelineMode
|
||||
{
|
||||
public TimelineDisabledMode()
|
||||
{
|
||||
headerState = new HeaderState
|
||||
{
|
||||
breadCrumb = TimelineModeGUIState.Enabled,
|
||||
options = TimelineModeGUIState.Enabled,
|
||||
sequenceSelector = TimelineModeGUIState.Enabled
|
||||
};
|
||||
|
||||
trackOptionsState = new TrackOptionsState
|
||||
{
|
||||
newButton = TimelineModeGUIState.Enabled,
|
||||
editAsAssetButton = TimelineModeGUIState.Enabled
|
||||
};
|
||||
mode = TimelineModes.Disabled;
|
||||
}
|
||||
|
||||
public override bool ShouldShowPlayRange(WindowState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool ShouldShowTimeCursor(WindowState state)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState ToolbarState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Disabled;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState TrackState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Enabled;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4c5eb52d37bb6714a98af73df7d9cf2c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,47 @@
|
|||
namespace UnityEditor.Timeline
|
||||
{
|
||||
class TimelineInactiveMode : TimelineMode
|
||||
{
|
||||
public TimelineInactiveMode()
|
||||
{
|
||||
headerState = new HeaderState
|
||||
{
|
||||
breadCrumb = TimelineModeGUIState.Disabled,
|
||||
options = TimelineModeGUIState.Enabled,
|
||||
sequenceSelector = TimelineModeGUIState.Enabled
|
||||
};
|
||||
|
||||
trackOptionsState = new TrackOptionsState
|
||||
{
|
||||
newButton = TimelineModeGUIState.Disabled,
|
||||
editAsAssetButton = TimelineModeGUIState.Enabled
|
||||
};
|
||||
mode = TimelineModes.Inactive;
|
||||
}
|
||||
|
||||
public override bool ShouldShowPlayRange(WindowState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool ShouldShowTimeCursor(WindowState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState ToolbarState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Disabled;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState TrackState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Disabled;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState PreviewState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Disabled;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5503f95d174761548a68a901beab13c2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.Timeline
|
||||
{
|
||||
enum TimelineModeGUIState
|
||||
{
|
||||
Disabled,
|
||||
Hidden,
|
||||
Enabled
|
||||
}
|
||||
|
||||
abstract class TimelineMode
|
||||
{
|
||||
public struct HeaderState
|
||||
{
|
||||
public TimelineModeGUIState breadCrumb;
|
||||
public TimelineModeGUIState sequenceSelector;
|
||||
public TimelineModeGUIState options;
|
||||
}
|
||||
|
||||
public struct TrackOptionsState
|
||||
{
|
||||
public TimelineModeGUIState newButton;
|
||||
public TimelineModeGUIState editAsAssetButton;
|
||||
}
|
||||
|
||||
public HeaderState headerState { get; protected set; }
|
||||
public TrackOptionsState trackOptionsState { get; protected set; }
|
||||
public TimelineModes mode { get; protected set; }
|
||||
|
||||
public abstract bool ShouldShowPlayRange(WindowState state);
|
||||
public abstract bool ShouldShowTimeCursor(WindowState state);
|
||||
|
||||
public virtual bool ShouldShowTrackBindings(WindowState state)
|
||||
{
|
||||
return ShouldShowTimeCursor(state);
|
||||
}
|
||||
|
||||
public virtual bool ShouldShowTimeArea(WindowState state)
|
||||
{
|
||||
return !state.IsEditingAnEmptyTimeline();
|
||||
}
|
||||
|
||||
public abstract TimelineModeGUIState TrackState(WindowState state);
|
||||
public abstract TimelineModeGUIState ToolbarState(WindowState state);
|
||||
|
||||
public virtual TimelineModeGUIState PreviewState(WindowState state)
|
||||
{
|
||||
return Application.isPlaying ? TimelineModeGUIState.Disabled : TimelineModeGUIState.Enabled;
|
||||
}
|
||||
|
||||
public virtual TimelineModeGUIState EditModeButtonsState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Enabled;
|
||||
}
|
||||
}
|
||||
|
||||
[Flags]
|
||||
internal enum TimelineModes
|
||||
{
|
||||
None = 0,
|
||||
Active = 1,
|
||||
ReadOnly = 2,
|
||||
Inactive = 4,
|
||||
Disabled = 8,
|
||||
AssetEdition = 16,
|
||||
All = Active | ReadOnly | Inactive | Disabled,
|
||||
Default = Active | AssetEdition
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a2cb43d6b0c226443be7e176590837a5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,52 @@
|
|||
namespace UnityEditor.Timeline
|
||||
{
|
||||
class TimelineReadOnlyMode : TimelineMode
|
||||
{
|
||||
public TimelineReadOnlyMode()
|
||||
{
|
||||
headerState = new HeaderState()
|
||||
{
|
||||
breadCrumb = TimelineModeGUIState.Enabled,
|
||||
options = TimelineModeGUIState.Enabled,
|
||||
sequenceSelector = TimelineModeGUIState.Enabled,
|
||||
};
|
||||
|
||||
trackOptionsState = new TrackOptionsState()
|
||||
{
|
||||
newButton = TimelineModeGUIState.Disabled,
|
||||
editAsAssetButton = TimelineModeGUIState.Disabled,
|
||||
};
|
||||
mode = TimelineModes.ReadOnly;
|
||||
}
|
||||
|
||||
public override bool ShouldShowPlayRange(WindowState state)
|
||||
{
|
||||
return state.editSequence.director != null && state.playRangeEnabled;
|
||||
}
|
||||
|
||||
public override bool ShouldShowTimeCursor(WindowState state)
|
||||
{
|
||||
return state.editSequence.director != null;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState TrackState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Disabled;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState ToolbarState(WindowState state)
|
||||
{
|
||||
return state.editSequence.director == null ? TimelineModeGUIState.Disabled : TimelineModeGUIState.Enabled;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState PreviewState(WindowState state)
|
||||
{
|
||||
return state.editSequence.director == null ? TimelineModeGUIState.Disabled : TimelineModeGUIState.Enabled;
|
||||
}
|
||||
|
||||
public override TimelineModeGUIState EditModeButtonsState(WindowState state)
|
||||
{
|
||||
return TimelineModeGUIState.Disabled;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3f8643c1f8dd449e85b548a14edbea2e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue