mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 04:15:36 +00:00
Merge branch 'PostFXReorgAndUpdate' of https://github.com/Areloch/Torque3D into Preview4_0
This commit is contained in:
commit
b05d5fd3bd
181 changed files with 2487 additions and 1458 deletions
|
|
@ -72,11 +72,13 @@ function @@::onAdd(%this)
|
|||
|
||||
function @@::onEnabled( %this )
|
||||
{
|
||||
$PostFX::@@::Enabled = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
function @@::onDisabled( %this )
|
||||
{
|
||||
$PostFX::@@::Enabled = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -101,9 +103,8 @@ function PostEffectEditorInspector::toggle@@(%this)
|
|||
@@.disable();
|
||||
}
|
||||
|
||||
//This function pair(applyFromPreset and settingsApply) are done the way they are, with the separated variables
|
||||
//so that we can effectively store the 'settings' away from the live variables that the postFX's actually utilize
|
||||
//when rendering. This allows us to modify things but still leave room for reverting or temporarily applying them
|
||||
//This function is called when the post FX is loaded via a postFX preset file. It's used to do any special-case onload work
|
||||
//At minimum, it ensures that if the preset indicates it should be enabled, it actually enables the postFX object itself
|
||||
function @@::applyFromPreset(%this)
|
||||
{
|
||||
if($PostFX::@@::Enabled)
|
||||
|
|
@ -112,8 +113,11 @@ function @@::applyFromPreset(%this)
|
|||
%this.disable();
|
||||
}
|
||||
|
||||
function @@::settingsApply(%this)
|
||||
//This function writes out the postFX's settings to the edited preset file
|
||||
function @@::savePresetSettings(%this)
|
||||
{
|
||||
PostFXManager::savePresetSetting("$PostFX::@@::Enabled");
|
||||
PostFXManager::savePresetSetting("$PostFX::@@::modColor");
|
||||
}
|
||||
|
||||
//Our actual postFX
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue