Add option for importing scale tracking to animation asset
This commit is contained in:
@@ -260,6 +260,13 @@ namespace FlaxEditor.Content.Import
|
||||
[EditorOrder(1050), DefaultValue(true)]
|
||||
public bool OptimizeKeyframes { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// If checked, the importer will import scale animation tracks (otherwise scale animation will be ignored).
|
||||
/// </summary>
|
||||
[EditorDisplay("Animation"), VisibleIf(nameof(ShowAnimation))]
|
||||
[EditorOrder(1055), DefaultValue(false)]
|
||||
public bool ImportScaleTracks { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Enables root motion extraction support from this animation.
|
||||
/// </summary>
|
||||
@@ -387,6 +394,7 @@ namespace FlaxEditor.Content.Import
|
||||
public float SamplingRate;
|
||||
public byte SkipEmptyCurves;
|
||||
public byte OptimizeKeyframes;
|
||||
public byte ImportScaleTracks;
|
||||
public byte EnableRootMotion;
|
||||
public string RootNodeName;
|
||||
|
||||
@@ -438,6 +446,7 @@ namespace FlaxEditor.Content.Import
|
||||
SamplingRate = SamplingRate,
|
||||
SkipEmptyCurves = (byte)(SkipEmptyCurves ? 1 : 0),
|
||||
OptimizeKeyframes = (byte)(OptimizeKeyframes ? 1 : 0),
|
||||
ImportScaleTracks = (byte)(ImportScaleTracks ? 1 : 0),
|
||||
EnableRootMotion = (byte)(EnableRootMotion ? 1 : 0),
|
||||
RootNodeName = RootNodeName,
|
||||
GenerateLODs = (byte)(GenerateLODs ? 1 : 0),
|
||||
@@ -479,6 +488,7 @@ namespace FlaxEditor.Content.Import
|
||||
SamplingRate = options.SamplingRate;
|
||||
SkipEmptyCurves = options.SkipEmptyCurves != 0;
|
||||
OptimizeKeyframes = options.OptimizeKeyframes != 0;
|
||||
ImportScaleTracks = options.ImportScaleTracks != 0;
|
||||
EnableRootMotion = options.EnableRootMotion != 0;
|
||||
RootNodeName = options.RootNodeName;
|
||||
GenerateLODs = options.GenerateLODs != 0;
|
||||
|
||||
Reference in New Issue
Block a user