2025-01-03 12:09:23 +00:00
|
|
|
using Godot;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
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 );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|