2024-12-01 17:07:41 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using Godot;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
{
|
|
|
|
[Tool]
|
|
|
|
[GlobalClass]
|
2025-01-08 18:46:17 +00:00
|
|
|
public partial class SaveViewportTexture:Action
|
2024-12-01 17:07:41 +00:00
|
|
|
{
|
|
|
|
[Export]
|
|
|
|
public SubViewport viewport;
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public string path = "";
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public float quality = 1;
|
|
|
|
|
2025-01-08 18:46:17 +00:00
|
|
|
protected override void _OnTrigger()
|
2024-12-01 17:07:41 +00:00
|
|
|
{
|
|
|
|
Textures.Save( viewport.GetTexture(), path, quality );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|