改改改
重大bug修复:track删除pathnode后不能正确更新 Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
@@ -326,5 +326,77 @@ namespace Ichni.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void swapDisplacement()
|
||||
{
|
||||
Displacement displacement = inspector.connectedGameElement as Displacement;
|
||||
if (displacement == null)
|
||||
{
|
||||
LogWindow.Log("Please select a Displacement first!", Color.red);
|
||||
return;
|
||||
}
|
||||
foreach (var anim in displacement.positionX.animations)
|
||||
{
|
||||
anim.endValue = -anim.endValue;
|
||||
anim.startValue = -anim.startValue;
|
||||
}
|
||||
foreach (var anim in displacement.positionY.animations)
|
||||
{
|
||||
anim.endValue = -anim.endValue;
|
||||
anim.startValue = -anim.startValue;
|
||||
}
|
||||
foreach (var anim in displacement.positionZ.animations)
|
||||
{
|
||||
anim.endValue = -anim.endValue;
|
||||
anim.startValue = -anim.startValue;
|
||||
}
|
||||
}
|
||||
public static void swapSwirl()
|
||||
{
|
||||
Swirl swirl = inspector.connectedGameElement as Swirl;
|
||||
if (swirl == null)
|
||||
{
|
||||
LogWindow.Log("Please select a Swirl first!", Color.red);
|
||||
return;
|
||||
}
|
||||
foreach (var anim in swirl.eulerAngleX.animations)
|
||||
{
|
||||
anim.endValue = -anim.endValue;
|
||||
anim.startValue = -anim.startValue;
|
||||
}
|
||||
foreach (var anim in swirl.eulerAngleY.animations)
|
||||
{
|
||||
anim.endValue = -anim.endValue;
|
||||
anim.startValue = -anim.startValue;
|
||||
}
|
||||
foreach (var anim in swirl.eulerAngleZ.animations)
|
||||
{
|
||||
anim.endValue = -anim.endValue;
|
||||
anim.startValue = -anim.startValue;
|
||||
}
|
||||
}
|
||||
public static void swapScale()
|
||||
{
|
||||
Scale scale = inspector.connectedGameElement as Scale;
|
||||
if (scale == null)
|
||||
{
|
||||
LogWindow.Log("Please select a Scale first!", Color.red);
|
||||
return;
|
||||
}
|
||||
foreach (var anim in scale.scaleX.animations)
|
||||
{
|
||||
anim.endValue = -anim.endValue;
|
||||
anim.startValue = -anim.startValue;
|
||||
}
|
||||
foreach (var anim in scale.scaleY.animations)
|
||||
{
|
||||
anim.endValue = -anim.endValue;
|
||||
anim.startValue = -anim.startValue;
|
||||
}
|
||||
foreach (var anim in scale.scaleZ.animations)
|
||||
{
|
||||
anim.endValue = -anim.endValue;
|
||||
anim.startValue = -anim.startValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user