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:
@@ -26,15 +26,15 @@ namespace Misaki.ArtTool
|
||||
public float3 scaleMinMax;
|
||||
public float uniformScaleMinMax;
|
||||
|
||||
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];
|
||||
|
||||
Random random;
|
||||
if (synchronized)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ namespace Misaki.ArtTool
|
||||
var weight = CalculateFieldsWeight(position);
|
||||
if (weight == 0)
|
||||
{
|
||||
return;
|
||||
return currentPoint;
|
||||
}
|
||||
|
||||
if (isEnablePosition)
|
||||
@@ -121,7 +121,7 @@ namespace Misaki.ArtTool
|
||||
|
||||
currentPoint.matrix = float4x4.TRS(position, rotation, scale);
|
||||
|
||||
points[index] = currentPoint;
|
||||
return currentPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user