rokojori_action_library/Runtime/Shading/Materials/Transfers/Texture2DPropertyTransfer.cs

37 lines
529 B
C#

using Godot;
using System.Reflection;
using System.Collections.Generic;
using Rokojori.Extensions;
namespace Rokojori
{
[Tool]
[GlobalClass]
public partial class Texture2DPropertyTransfer:Resource
{
[Export]
public Sampler2DPropertyName from;
[Export]
public Sampler2DPropertyName to;
public void Transfer( Material a, Material b )
{
var v = from.Get( a );
if ( v == null )
{
return;
}
else
{
to.Set( b, v );
}
}
}
}