Test screenshots through ViewportCapture: sRGB instead of the dark linear HDR frame
This commit is contained in:
1 parent
fcdd2a041b
commit
eaf58c0d38
1 file changed
+2
-1
@@ -8,6 +8,7 @@ using Cthangover.Mods.Interface.Tool;
|
|||||||
using Cthangover.Mods.Rpg;
|
using Cthangover.Mods.Rpg;
|
||||||
using Cthangover.Tools.Common;
|
using Cthangover.Tools.Common;
|
||||||
using Cthangover.Tools.Services;
|
using Cthangover.Tools.Services;
|
||||||
|
using Cthangover.Mods.Interface.View;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Cthangover.Tools.RpgEditor.Tests
|
namespace Cthangover.Tools.RpgEditor.Tests
|
||||||
@@ -228,7 +229,7 @@ namespace Cthangover.Tools.RpgEditor.Tests
|
|||||||
if (string.IsNullOrEmpty(shotsDir) || DisplayServer.GetName() == "headless")
|
if (string.IsNullOrEmpty(shotsDir) || DisplayServer.GetName() == "headless")
|
||||||
return;
|
return;
|
||||||
DirAccess.MakeDirRecursiveAbsolute(shotsDir);
|
DirAccess.MakeDirRecursiveAbsolute(shotsDir);
|
||||||
GetViewport().GetTexture().GetImage()?.SavePng(shotsDir.TrimEnd('/') + "/rpg_editor_" + name + ".png");
|
ViewportCapture.SavePng(GetViewport(), shotsDir.TrimEnd('/') + "/rpg_editor_" + name + ".png");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Finish()
|
private void Finish()
|
||||||
|
|||||||
Reference in new issue
Block a user