mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-27 23:35:45 +00:00
Fixes logic that checks if a postFX was enabled so the PostFX Editor works properly
Corrected the enabled variable hook-in for the SSAOPostFX
This commit is contained in:
parent
d18721d78e
commit
d25e9d64dc
2 changed files with 7 additions and 3 deletions
|
|
@ -122,18 +122,22 @@ function SSAOPostFx::onEnabled( %this )
|
||||||
// from our #ssaoMask texture target.
|
// from our #ssaoMask texture target.
|
||||||
$AL::UseSSAOMask = true;
|
$AL::UseSSAOMask = true;
|
||||||
|
|
||||||
|
$PostFX::SSAOPostFx::Enabled = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SSAOPostFx::onDisabled( %this )
|
function SSAOPostFx::onDisabled( %this )
|
||||||
{
|
{
|
||||||
$AL::UseSSAOMask = false;
|
$AL::UseSSAOMask = false;
|
||||||
|
|
||||||
|
$PostFX::SSAOPostFx::Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SSAOPostFx::populatePostFXSettings(%this)
|
function SSAOPostFx::populatePostFXSettings(%this)
|
||||||
{
|
{
|
||||||
PostEffectEditorInspector.startGroup("SSAO - General");
|
PostEffectEditorInspector.startGroup("SSAO - General");
|
||||||
PostEffectEditorInspector.addCallbackField("$PostFX::SSAOPostFx::Enabled", "Enabled", "bool", "", $PostFXManager::PostFX::Enable, "", "toggleSSAOPostFx");
|
PostEffectEditorInspector.addCallbackField("$PostFX::SSAOPostFx::Enabled", "Enabled", "bool", "", $PostFX::SSAOPostFx::Enabled, "", "toggleSSAOPostFx");
|
||||||
PostEffectEditorInspector.addField("$PostFX::SSAOPostFx::quality", "Quality", "list", "0,1,2", $PostFX::SSAOPostFX::quality, "0,1,2");
|
PostEffectEditorInspector.addField("$PostFX::SSAOPostFx::quality", "Quality", "list", "0,1,2", $PostFX::SSAOPostFX::quality, "0,1,2");
|
||||||
PostEffectEditorInspector.addField("$PostFX::SSAOPostFx::overallStrength", "Overall Strength", "float", "", $PostFX::SSAOPostFX::overallStrength, "");
|
PostEffectEditorInspector.addField("$PostFX::SSAOPostFx::overallStrength", "Overall Strength", "float", "", $PostFX::SSAOPostFX::overallStrength, "");
|
||||||
PostEffectEditorInspector.addField("$PostFX::SSAOPostFx::blurDepthTol", "Blur (Softness)", "float", "", $PostFX::SSAOPostFX::blurDepthTol, "");
|
PostEffectEditorInspector.addField("$PostFX::SSAOPostFx::blurDepthTol", "Blur (Softness)", "float", "", $PostFX::SSAOPostFX::blurDepthTol, "");
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ function PostFXEditor::refresh(%this)
|
||||||
{
|
{
|
||||||
%postEffect = PostFXManager.getKey(%i);
|
%postEffect = PostFXManager.getKey(%i);
|
||||||
|
|
||||||
if(%postEffect.isEnabled)
|
if(%postEffect.isEnabled())
|
||||||
PostEffectEditorList.addRow( %i, %postEffect.getName() );
|
PostEffectEditorList.addRow( %i, %postEffect.getName() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -143,7 +143,7 @@ function PostFXEditorNewPFXWindow::showDialog(%this)
|
||||||
{
|
{
|
||||||
%postEffect = PostFXManager.getKey(%i);
|
%postEffect = PostFXManager.getKey(%i);
|
||||||
|
|
||||||
if(!%postEffect.isEnabled)
|
if(!%postEffect.isEnabled())
|
||||||
PostFXEditorNewPFXList.addRow( %i, %postEffect.getName() );
|
PostFXEditorNewPFXList.addRow( %i, %postEffect.getName() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue