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

37 lines
529 B
C#
Raw Normal View History

2025-01-03 12:09:23 +00:00
using Godot;
using System.Reflection;
using System.Collections.Generic;
2026-05-22 12:25:02 +00:00
using Rokojori.Extensions;
2025-01-03 12:09:23 +00:00
namespace Rokojori
{
[Tool]
[GlobalClass]
public partial class Texture2DPropertyTransfer:Resource
{
[Export]
2025-10-24 11:38:51 +00:00
public Sampler2DPropertyName from;
2025-01-03 12:09:23 +00:00
[Export]
2025-10-24 11:38:51 +00:00
public Sampler2DPropertyName to;
2025-01-03 12:09:23 +00:00
public void Transfer( Material a, Material b )
{
var v = from.Get( a );
if ( v == null )
{
return;
}
else
{
to.Set( b, v );
}
}
}
}