Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Add DefaultFrameRate to animation import options
Browse files Browse the repository at this point in the history
  • Loading branch information
mafiesto4 committed Sep 21, 2018
1 parent 4cc5c4c commit 89ceb2f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions FlaxEditor/Content/Import/ModelImportEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ public class ModelImportSettings
[EditorOrder(1020), Limit(0), EditorDisplay("Animation"), Tooltip("Imported animation last frame index. Used only if Duration mode is set to Custom.")]
public float FramesRangeEnd { get; set; } = 0;

/// <summary>
/// The imported animation default frame rate. Can specify the default frames per second amount for imported animation. If value is 0 then the original animation frame rate will be used.
/// </summary>
[EditorOrder(1025), Limit(0, 1000, 0.01f), EditorDisplay("Animation"), Tooltip("The imported animation default frame rate. Can specify the default frames per second amount for imported animation. If value is 0 then the original animation frame rate will be used.")]
public float DefaultFrameRate { get; set; } = 0.0f;

/// <summary>
/// The imported animation sampling rate. If value is 0 then the original animation speed will be used.
/// </summary>
Expand Down Expand Up @@ -248,6 +254,7 @@ internal struct InternalOptions
public AnimationDuration Duration;
public float FramesRangeStart;
public float FramesRangeEnd;
public float DefaultFrameRate;
public float SamplingRate;
public byte SkipEmptyCurves;
public byte OptimizeKeyframes;
Expand Down Expand Up @@ -279,6 +286,7 @@ internal void ToInternal(out InternalOptions options)
Duration = Duration,
FramesRangeStart = FramesRangeStart,
FramesRangeEnd = FramesRangeEnd,
DefaultFrameRate = DefaultFrameRate,
SamplingRate = SamplingRate,
SkipEmptyCurves = (byte)(SkipEmptyCurves ? 1 : 0),
OptimizeKeyframes = (byte)(OptimizeKeyframes ? 1 : 0),
Expand Down Expand Up @@ -306,6 +314,7 @@ internal void FromInternal(ref InternalOptions options)
CenterGeometry = options.CenterGeometry != 0;
FramesRangeStart = options.FramesRangeStart;
FramesRangeEnd = options.FramesRangeEnd;
DefaultFrameRate = options.DefaultFrameRate;
SamplingRate = options.SamplingRate;
SkipEmptyCurves = options.SkipEmptyCurves != 0;
OptimizeKeyframes = options.OptimizeKeyframes != 0;
Expand Down

0 comments on commit 89ceb2f

Please sign in to comment.