mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-23 05:15:34 +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
|
|
@ -134,7 +134,7 @@ function AssetBrowser::moveLevelAsset(%this, %assetDef, %destination)
|
|||
function AssetBrowser::buildLevelAssetPreview(%this, %assetDef, %previewData)
|
||||
{
|
||||
%previewData.assetName = %assetDef.assetName;
|
||||
%previewData.assetPath = %assetDef.getlevelFile();
|
||||
%previewData.assetPath = %assetDef.getLevelPath();
|
||||
%previewData.doubleClickCommand = "schedule( 1, 0, \"EditorOpenMission\", "@%assetDef@");";
|
||||
|
||||
%levelPreviewImage = %assetDesc.PreviewImage;
|
||||
|
|
@ -149,5 +149,5 @@ function AssetBrowser::buildLevelAssetPreview(%this, %assetDef, %previewData)
|
|||
%previewData.tooltip = "Asset Name: " @ %assetDef.assetName @ "\n" @
|
||||
"Asset Type: Level Asset\n" @
|
||||
"Asset Definition ID: " @ %assetDef @ "\n" @
|
||||
"Level File path: " @ %assetDef.getLevelFile();
|
||||
"Level File path: " @ %assetDef.getLevelPath();
|
||||
}
|
||||
|
|
@ -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