2025-11-28 14:24:23 +00:00
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
|
2026-05-22 12:25:02 +00:00
|
|
|
using Rokojori.Extensions;
|
2025-11-28 14:24:23 +00:00
|
|
|
namespace Rokojori
|
|
|
|
|
{
|
|
|
|
|
[Tool]
|
|
|
|
|
[GlobalClass]
|
|
|
|
|
public partial class SetCameraFarDOF:Action
|
|
|
|
|
{
|
|
|
|
|
[Export]
|
|
|
|
|
public WorldEnvironment worldEnvironment;
|
|
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
|
public bool dofBlurFarEnabled = true;
|
|
|
|
|
|
|
|
|
|
protected override void _OnTrigger()
|
|
|
|
|
{
|
|
|
|
|
var atts = worldEnvironment.CameraAttributes as CameraAttributesPractical;
|
|
|
|
|
|
|
|
|
|
if ( atts == null )
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
atts.DofBlurFarEnabled = dofBlurFarEnabled;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|