diff options
Diffstat (limited to 'Assets/ActionTool/Editor/ActionManager.cs')
-rw-r--r-- | Assets/ActionTool/Editor/ActionManager.cs | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Assets/ActionTool/Editor/ActionManager.cs b/Assets/ActionTool/Editor/ActionManager.cs index 52311140..7c3f1df4 100644 --- a/Assets/ActionTool/Editor/ActionManager.cs +++ b/Assets/ActionTool/Editor/ActionManager.cs @@ -28,6 +28,7 @@ namespace ActionTool public static ActionEventEditor EventEditWindow;
public static ActionColliderFrameEditor ColliderFrameWindow;
public static ActionColliderEditor ColliderWindow;
+ public static ActionRootMotionEditor RootMotionEditor;
public static ActionToolSettings Settings;
@@ -115,12 +116,22 @@ namespace ActionTool private static GameObject s_RootActionTool;
private const string kRootActionTool = "RootActionTool";
- public const int kMaxEventsPerFrame = 10;
- public static int eventAndBoxCount
+ public static int MaxEventsPerFrame // 所有帧里面事件最多有几个
{
get
{
- return kMaxEventsPerFrame + (animationData != null ? animationData.GetBoxesCount() : 0);
+ if (animationData == null)
+ return 0;
+ return animationData.GetMaxAnimationEventsCount();
+ }
+ }
+
+ public static int GridRowCount
+ {
+ get
+ {
+ bool hasRM = animationData != null && animationData.overrideRootMotion != null;
+ return (MaxEventsPerFrame + 1) + (animationData != null ? animationData.GetBoxesCount() : 0) + (hasRM ? 1 : 0);
}
}
@@ -481,5 +492,10 @@ namespace ActionTool animationData.DeleteEvent(animEvent);
}
+ public static void EditRootMotionOverrideData()
+ {
+ RootMotionEditor = EditorWindow.GetWindow<ActionRootMotionEditor>(true);
+ }
+
}
}
\ No newline at end of file |