Fix error amd Update features.
Changed Span<PointData> to ReadOnlySpan<PointData> on method Operate in EffectorBase.cs Changed the return type of method Operate in EffectorBase.cs from void to PointDate Added FieldHelper and BlendField function to make the blending work.
This commit is contained in:
@@ -21,21 +21,21 @@ namespace Misaki.ArtTool
|
||||
public float3 scale;
|
||||
public float uniformScale;
|
||||
|
||||
public override void Operate(int index, float4x4 nodeWorldMatrix, Span<PointData> points)
|
||||
public override PointData Operate(int index, float4x4 nodeWorldMatrix, ReadOnlySpan<PointData> points)
|
||||
{
|
||||
var currentPoint = points[index];
|
||||
if (!isEnablePosition && !isEnableRotation && !isEnableScale)
|
||||
{
|
||||
return;
|
||||
return currentPoint;
|
||||
}
|
||||
|
||||
var currentPoint = points[index];
|
||||
|
||||
MatrixHelper.DecomposeMatrix(currentPoint.matrix, out var position, out var rotation, out var scale);
|
||||
|
||||
var weight = CalculateFieldsWeight(position);
|
||||
if (weight == 0)
|
||||
{
|
||||
return;
|
||||
return currentPoint;
|
||||
}
|
||||
|
||||
if (isEnablePosition)
|
||||
@@ -96,7 +96,7 @@ namespace Misaki.ArtTool
|
||||
|
||||
currentPoint.matrix = float4x4.TRS(position, rotation, scale);
|
||||
|
||||
points[index] = currentPoint;
|
||||
return currentPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user