mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 00:05:40 +00:00
Moved unneeded modules to Templates/Modules
Added templated getObjectsByClass to Scene for easier engine-side polling of objects, including nested checks for subscenes Proper init'ing of mGamemodeName in LevelAsset, as well as proper fieldType for mIsSubLevel D3D11 added logic to handle scaling down of textures in cubemap arrays for lower texture resolution preferences Added ability to collapse groups programmatically to GuiVariableInspector Upped PSSM shadowmap max size to 4096 Caught GL deferred lighting/probes up to D3D11 Temporarily disabled forward lighting/probes on GL materials until conversion finished Upped smMaxInstancingVerts to 2000 from 200 to support slightly more detailed meshes being instanced Reordered project settings so they load ahead of core modules, so that core modules can actually use project settings Established current preset file for PostFXManager to use for reverting WIP logic for forcing probes to update as part of level lighting load step in loading process Streamlined PostFXManager code, removing unnecessary/redundant files Coverted HDR, Lightrays and SSAO and ExamplePostEffect to use new PostFX Manager/Editor paradigm PostFX manager now enacts callbacks so that postFXs' can process their own settings as well as provide editor fields Changed PostFX editor to work with new callbacks via using VariableInspector Updated PostEffectAsset's template file so new PostFX's will now automatically register with the PostFXManager and have the needed new callbacks for integration Made HDR on by default, removed enable field from editing Made probe bake resolution a project setting Updated many GL postFX shaders to have proper case for PostFx.glsl Example module now loads ExampleGUI and ExamplePostEffect during init'ing Removed unneeded autoload definitions from ExampleModule's module file Fixed Graphics Adapter settings field to properly display as well as apply setting Updated many referenced profiles in tools folder to use the Tools specific gui profiles to make theming more consistent Fixed coloration of tools button bitmap to make theming more consistent Updated a few theme settings for improved visibility with theme, particularly selected/highlighted text Moved AssetBrowser field types to separated folder/files Updated new module creation to properly utilize template file instead of overriding it with a programmatic script generation. Removed unneded default autoload definitions from new modules Added WIP for editing Module/Asset dependencies Updated the PostEffectAsset to properly generate glsl and hlsl files from templates Updated module editor window to display only necessary fields Added WIP of TerrainAsset Added shaderCache gitignore file so folder isn't lost
This commit is contained in:
parent
ff4c2d59fc
commit
e7bf49e801
165 changed files with 2328 additions and 5095 deletions
|
|
@ -57,18 +57,6 @@ function AssetBrowser_addModuleWindow::CreateNewModule(%this)
|
|||
Extension = "asset.taml";
|
||||
Recurse = true;
|
||||
};
|
||||
|
||||
//Autoload the usual suspects
|
||||
new AutoloadAssets()
|
||||
{
|
||||
AssetType = "ComponentAsset";
|
||||
Recurse = true;
|
||||
};
|
||||
new AutoloadAssets()
|
||||
{
|
||||
AssetType = "GUIAsset";
|
||||
Recurse = true;
|
||||
};
|
||||
};
|
||||
|
||||
TAMLWrite(%newModule, %moduleDefinitionFilePath);
|
||||
|
|
@ -100,16 +88,6 @@ function AssetBrowser_addModuleWindow::CreateNewModule(%this)
|
|||
|
||||
warnf("CreateNewModule - Something went wrong and we couldn't write the script file!");
|
||||
}
|
||||
|
||||
if(%file.openForWrite(%moduleScriptFilePath))
|
||||
{
|
||||
%file.writeline("function " @ %newModuleName @ "::onCreate(%this)\n{\n\n}\n");
|
||||
%file.writeline("function " @ %newModuleName @ "::onDestroy(%this)\n{\n\n}\n");
|
||||
|
||||
//todo, pre-write any event functions of interest
|
||||
|
||||
%file.close();
|
||||
}
|
||||
|
||||
//force a refresh of our modules list
|
||||
ModuleDatabase.ignoreLoadedGroups(true);
|
||||
|
|
|
|||
|
|
@ -7,12 +7,16 @@ function AssetBrowser::createPostEffectAsset(%this)
|
|||
|
||||
%tamlpath = %modulePath @ "/postFXs/" @ %assetName @ ".asset.taml";
|
||||
%scriptPath = %modulePath @ "/postFXs/" @ %assetName @ ".cs";
|
||||
%hlslPath = %modulePath @ "/postFXs/" @ %assetName @ "P.hlsl";
|
||||
%glslPath = %modulePath @ "/postFXs/" @ %assetName @ "P.glsl";
|
||||
|
||||
%asset = new PostEffectAsset()
|
||||
{
|
||||
AssetName = %assetName;
|
||||
versionId = 1;
|
||||
scriptFile = %assetName @ ".cs";
|
||||
hlslShader = %assetName @ "P.hlsl";
|
||||
glslShader = %assetName @ "P.glsl";
|
||||
};
|
||||
|
||||
TamlWrite(%asset, %tamlpath);
|
||||
|
|
@ -54,6 +58,56 @@ function AssetBrowser::createPostEffectAsset(%this)
|
|||
warnf("CreatePostFXAsset - Something went wrong and we couldn't write the PostFX script file!");
|
||||
}
|
||||
|
||||
//hlsl shader
|
||||
%postFXTemplateCodeFilePath = %this.templateFilesPath @ "postFXFileP.hlsl.template";
|
||||
|
||||
if(%file.openForWrite(%hlslPath) && %templateFile.openForRead(%postFXTemplateCodeFilePath))
|
||||
{
|
||||
while( !%templateFile.isEOF() )
|
||||
{
|
||||
%line = %templateFile.readline();
|
||||
%line = strreplace( %line, "@@", %assetName );
|
||||
|
||||
%file.writeline(%line);
|
||||
echo(%line);
|
||||
}
|
||||
|
||||
%file.close();
|
||||
%templateFile.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
%file.close();
|
||||
%templateFile.close();
|
||||
|
||||
warnf("CreatePostFXAsset - Something went wrong and we couldn't write the PostFX hlsl file!");
|
||||
}
|
||||
|
||||
//glsl shader
|
||||
%postFXTemplateCodeFilePath = %this.templateFilesPath @ "postFXFileP.glsl.template";
|
||||
|
||||
if(%file.openForWrite(%glslPath) && %templateFile.openForRead(%postFXTemplateCodeFilePath))
|
||||
{
|
||||
while( !%templateFile.isEOF() )
|
||||
{
|
||||
%line = %templateFile.readline();
|
||||
%line = strreplace( %line, "@@", %assetName );
|
||||
|
||||
%file.writeline(%line);
|
||||
echo(%line);
|
||||
}
|
||||
|
||||
%file.close();
|
||||
%templateFile.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
%file.close();
|
||||
%templateFile.close();
|
||||
|
||||
warnf("CreatePostFXAsset - Something went wrong and we couldn't write the PostFX glsl file!");
|
||||
}
|
||||
|
||||
return %tamlpath;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
function AssetBrowser::createTerrainAsset(%this)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::editTerrainAsset(%this, %assetDef)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::duplicateTerrainAsset(%this, %assetDef, %targetModule)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::importTerrainAsset(%this, %assetDef)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::dragAndDropTerrainAsset(%this, %assetDef, %dropTarget)
|
||||
{
|
||||
if(!isObject(%dropTarget))
|
||||
return;
|
||||
}
|
||||
|
||||
function AssetBrowser::renameTerrainAsset(%this, %assetDef, %newAssetId, %originalName, %newName)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::deleteTerrainAsset(%this, %assetDef)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::buildTerrainAssetPreview(%this, %assetDef, %previewData)
|
||||
{
|
||||
%previewData.assetName = %assetDef.assetName;
|
||||
%previewData.assetPath = "";
|
||||
%previewData.doubleClickCommand = "";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/gameObjectIcon";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.gameObjectName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
%previewData.tooltip = %assetDef.gameObjectName;
|
||||
}
|
||||
|
||||
function GuiInspectorTypeTerrainAssetPtr::onClick( %this, %fieldName )
|
||||
{
|
||||
//Get our data
|
||||
%obj = %this.getInspector().getInspectObject(0);
|
||||
}
|
||||
|
||||
function GuiInspectorTypeTerrainAssetPtr::onControlDropped( %this, %payload, %position )
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
function AssetBrowser::createTerrainMaterialAsset(%this)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::editTerrainMaterialAsset(%this, %assetDef)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::duplicateTerrainMaterialAsset(%this, %assetDef, %targetModule)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::importTerrainMaterialAsset(%this, %assetDef)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::dragAndDropTerrainMaterialAsset(%this, %assetDef, %dropTarget)
|
||||
{
|
||||
if(!isObject(%dropTarget))
|
||||
return;
|
||||
}
|
||||
|
||||
function AssetBrowser::renameTerrainMaterialAsset(%this, %assetDef, %newAssetId, %originalName, %newName)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::deleteTerrainMaterialAsset(%this, %assetDef)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::buildTerrainMaterialAssetPreview(%this, %assetDef, %previewData)
|
||||
{
|
||||
%previewData.assetName = %assetDef.assetName;
|
||||
%previewData.assetPath = "";
|
||||
%previewData.doubleClickCommand = "";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/gameObjectIcon";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.gameObjectName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
%previewData.tooltip = %assetDef.gameObjectName;
|
||||
}
|
||||
|
||||
function GuiInspectorTypeTerrainMaterialAssetPtr::onClick( %this, %fieldName )
|
||||
{
|
||||
//Get our data
|
||||
%obj = %this.getInspector().getInspectObject(0);
|
||||
}
|
||||
|
||||
function GuiInspectorTypeTerrainMaterialAssetPtr::onControlDropped( %this, %payload, %position )
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -82,23 +82,40 @@ function AssetBrowser::editModuleInfo(%this)
|
|||
AssetBrowser.tempModule = new ModuleDefinition();
|
||||
AssetBrowser.tempModule.assignFieldsFrom(%moduleDef);
|
||||
|
||||
ModuleEditInspector.inspect(AssetBrowser.tempModule);
|
||||
AssetBrowser_editModule.editedModuleId = AssetBrowser.selectedModule;
|
||||
AssetBrowser_editModule.editedModule = AssetBrowser.tempModule;
|
||||
|
||||
//remove some of the groups we don't need:
|
||||
for(%i=0; %i < ModuleEditInspector.getCount(); %i++)
|
||||
{
|
||||
%caption = ModuleEditInspector.getObject(%i).caption;
|
||||
|
||||
if(%caption $= "BuildId" || %caption $= "type" || %caption $= "Dependencies" || %caption $= "scriptFile"
|
||||
|| %caption $= "AssetTagsManifest" || %caption $= "ScopeSet" || %caption $= "ModulePath"
|
||||
|| %caption $= "ModuleFile" || %caption $= "ModuleFilePath" || %caption $= "ModuleScriptFilePath" )
|
||||
{
|
||||
ModuleEditInspector.remove(ModuleEditInspector.getObject(%i));
|
||||
%i--;
|
||||
}
|
||||
}
|
||||
/// Module configuration.
|
||||
ModuleEditInspector.startGroup("General");
|
||||
ModuleEditInspector.addField("ModuleId", "ModuleId", "string", "", AssetBrowser.tempModule.ModuleId, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("VersionId", "VersionId", "string", "", AssetBrowser.tempModule.VersionId, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("BuildId", "BuildId", "string", "", AssetBrowser.tempModule.BuildId, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("enabled", "enabled", "bool", "", AssetBrowser.tempModule.enabled, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("Description", "Description", "command", "", AssetBrowser.tempModule.Description, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("Group", "Group", "string", "", AssetBrowser.tempModule.Group, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.endGroup();
|
||||
|
||||
ModuleEditInspector.startGroup("Management");
|
||||
ModuleEditInspector.addField("Synchronized", "Synchronized", "bool", "", AssetBrowser.tempModule.Synchronized, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("Deprecated", "Deprecated", "bool", "", AssetBrowser.tempModule.Deprecated, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("CriticalMerge", "CriticalMerge", "bool", "", AssetBrowser.tempModule.CriticalMerge, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("OverrideExistingObjects", "OverrideExistingObjects", "bool", "", AssetBrowser.tempModule.OverrideExistingObjects, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.endGroup();
|
||||
|
||||
ModuleEditInspector.startGroup("Meta");
|
||||
ModuleEditInspector.addField("Author", "Author", "string", "", AssetBrowser.tempModule.Author, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("Type", "Type", "string", "", AssetBrowser.tempModule.Type, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.endGroup();
|
||||
|
||||
ModuleEditInspector.startGroup("Script");
|
||||
ModuleEditInspector.addField("ScriptFile", "ScriptFile", "string", "", AssetBrowser.tempModule.ScriptFile, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("CreateFunction", "CreateFunction", "string", "", AssetBrowser.tempModule.CreateFunction, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.addField("DestroyFunction", "DestroyFunction", "string", "", AssetBrowser.tempModule.DestroyFunction, "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.endGroup();
|
||||
|
||||
ModuleEditInspector.startGroup("Dependencies");
|
||||
ModuleEditInspector.addField("ModuleDependencies", "Module Dependencies", "ModuleDependenciesButton", "", "", "", AssetBrowser.tempModule);
|
||||
ModuleEditInspector.endGroup();
|
||||
}
|
||||
|
||||
function AssetBrowser::renameModule(%this)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,92 @@
|
|||
|
||||
function GuiInspectorVariableGroup::buildAssetDependenciesField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
|
||||
{
|
||||
%extent = 200;
|
||||
|
||||
%fieldCtrl = %this.createInspectorField();
|
||||
|
||||
%extent = %this.stack.getExtent();
|
||||
|
||||
%width = mRound(%extent/2);
|
||||
%height = 20;
|
||||
%inset = 10;
|
||||
|
||||
%editControl = new GuiPopUpMenuCtrl() {
|
||||
class = "guiInspectorListField";
|
||||
maxPopupHeight = "200";
|
||||
sbUsesNAColor = "0";
|
||||
reverseTextList = "0";
|
||||
bitmapBounds = "16 16";
|
||||
maxLength = "1024";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "ToolsGuiPopUpMenuProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = %fieldCtrl.edit.position;
|
||||
Extent = %fieldCtrl.edit.extent;
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = %tooltip;
|
||||
text = %fieldDefaultVal;
|
||||
hovertime = "1000";
|
||||
ownerObject = %ownerObj;
|
||||
fieldName = %fieldName;
|
||||
callbackName = %callbackName;
|
||||
};
|
||||
|
||||
//set the field value
|
||||
if(getSubStr(%this.fieldName, 0, 1) $= "$")
|
||||
{
|
||||
if(%fieldName $= "")
|
||||
%editControl.setText(%fieldName);
|
||||
}
|
||||
else if(isObject(%ownerObj))
|
||||
{
|
||||
//regular variable
|
||||
%setCommand = %editControl @ ".setText(" @ %ownerObj @ "." @ %fieldName @ ");";
|
||||
eval(%setCommand);
|
||||
}
|
||||
|
||||
%listCount = getTokenCount(%fieldDataVals, ",");
|
||||
|
||||
for(%i=0; %i < %listCount; %i++)
|
||||
{
|
||||
%entryText = getToken(%fieldDataVals, ",", %i);
|
||||
%editControl.add(%entryText);
|
||||
}
|
||||
|
||||
%fieldCtrl.setCaption(%fieldLabel);
|
||||
%fieldCtrl.setEditControl(%editControl);
|
||||
|
||||
//echo("GuiInspectorListField - " @ %editControl.getID() @ " - " @ %fieldName);
|
||||
|
||||
%this.addInspectorField(%fieldCtrl);
|
||||
}
|
||||
|
||||
function guiInspectorListField::onSelect( %this, %id, %text )
|
||||
{
|
||||
if(getSubStr(%this.fieldName, 0, 1) $= "$")
|
||||
{
|
||||
//ah, a global var, just do it straight, then
|
||||
%setCommand = %this.fieldName @ " = \"" @ %text @ "\";";
|
||||
}
|
||||
else if(isObject(%this.ownerObj))
|
||||
{
|
||||
//regular variable
|
||||
%setCommand = %this.ownerObject @ "." @ %this.fieldName @ " = \"" @ %text @ "\";";
|
||||
}
|
||||
else if(%this.callbackName !$= "")
|
||||
{
|
||||
%setCommand = %this.callbackName @ "(\"" @ %this.fieldName @ "\",\"" @ %text @"\");";
|
||||
}
|
||||
|
||||
eval(%setCommand);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
function GuiVariableInspector::onInspectorFieldModified(%this, %targetObj, %fieldName, %index, %oldValue, %newValue)
|
||||
{
|
||||
echo("FIELD CHANGED: " @ %fieldName @ " from " @ %oldValue @ " to " @ %newValue);
|
||||
}
|
||||
|
||||
function GuiInspectorVariableGroup::onConstructField(%this, %fieldName, %fieldLabel, %fieldTypeName, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
|
||||
{
|
||||
%inspector = %this.getParent();
|
||||
%makeCommand = %this @ ".build" @ %fieldTypeName @ "Field(\""@ %fieldName @ "\",\"" @ %fieldLabel @ "\",\"" @ %fieldDesc @ "\",\"" @
|
||||
%fieldDefaultVal @ "\",\"" @ %fieldDataVals @ "\",\"" @ %inspector @ "." @ %callbackName @ "\",\"" @ %ownerObj @"\");";
|
||||
eval(%makeCommand);
|
||||
}
|
||||
|
|
@ -1,15 +1,3 @@
|
|||
function GuiVariableInspector::onInspectorFieldModified(%this, %targetObj, %fieldName, %index, %oldValue, %newValue)
|
||||
{
|
||||
echo("FIELD CHANGED: " @ %fieldName @ " from " @ %oldValue @ " to " @ %newValue);
|
||||
}
|
||||
|
||||
function GuiInspectorVariableGroup::onConstructField(%this, %fieldName, %fieldLabel, %fieldTypeName, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
|
||||
{
|
||||
%inspector = %this.getParent();
|
||||
%makeCommand = %this @ ".build" @ %fieldTypeName @ "Field(\""@ %fieldName @ "\",\"" @ %fieldLabel @ "\",\"" @ %fieldDesc @ "\",\"" @
|
||||
%fieldDefaultVal @ "\",\"" @ %fieldDataVals @ "\",\"" @ %inspector @ "." @ %callbackName @ "\",\"" @ %ownerObj @"\");";
|
||||
eval(%makeCommand);
|
||||
}
|
||||
|
||||
function GuiInspectorVariableGroup::buildListField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
|
||||
{
|
||||
|
|
@ -110,7 +98,7 @@ function GuiInspectorVariableGroup::buildListField(%this, %fieldName, %fieldLabe
|
|||
%fieldCtrl.setCaption(%fieldLabel);
|
||||
%fieldCtrl.setEditControl(%editControl);
|
||||
|
||||
echo("GuiInspectorListField - " @ %editControl.getID() @ " - " @ %fieldName);
|
||||
//echo("GuiInspectorListField - " @ %editControl.getID() @ " - " @ %fieldName);
|
||||
|
||||
%this.addInspectorField(%fieldCtrl);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
|
||||
function GuiInspectorVariableGroup::buildModuleDependenciesButtonField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
|
||||
{
|
||||
%extent = %this.stack.getExtent();
|
||||
|
||||
%width = mRound(%extent/2);
|
||||
%height = 20;
|
||||
|
||||
%button = new GuiButtonCtrl()
|
||||
{
|
||||
extent = %extent.x SPC %height;
|
||||
text = "Edit Module Dependencies";
|
||||
class = "ModuleDependenciesButton";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
};
|
||||
|
||||
%this.stack.add(%button);
|
||||
}
|
||||
|
||||
function ModuleDependenciesButton::onClick( %this )
|
||||
{
|
||||
/*if(getSubStr(%this.fieldName, 0, 1) $= "$")
|
||||
{
|
||||
//ah, a global var, just do it straight, then
|
||||
%setCommand = %this.fieldName @ " = \"" @ %text @ "\";";
|
||||
}
|
||||
else if(isObject(%this.ownerObj))
|
||||
{
|
||||
//regular variable
|
||||
%setCommand = %this.ownerObject @ "." @ %this.fieldName @ " = \"" @ %text @ "\";";
|
||||
}
|
||||
else if(%this.callbackName !$= "")
|
||||
{
|
||||
%setCommand = %this.callbackName @ "(\"" @ %this.fieldName @ "\",\"" @ %text @"\");";
|
||||
}
|
||||
|
||||
eval(%setCommand);*/
|
||||
echo("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
|
||||
}
|
||||
|
|
@ -61,6 +61,12 @@ function @@::preProcess( %this )
|
|||
{
|
||||
}
|
||||
|
||||
function @@::onAdd(%this)
|
||||
{
|
||||
//Register the postFX with the manager
|
||||
PostFXManager.registerPostEffect(%this);
|
||||
}
|
||||
|
||||
function @@::onEnabled( %this )
|
||||
{
|
||||
return true;
|
||||
|
|
@ -70,6 +76,36 @@ function @@::onDisabled( %this )
|
|||
{
|
||||
}
|
||||
|
||||
//This is used to populate the PostFXEditor's settings so the post FX can be edited
|
||||
//This is automatically polled for any postFX that has been registered(in our onAdd) and the settings
|
||||
//are thus exposed for editing
|
||||
function @@::populatePostFXSettings(%this)
|
||||
{
|
||||
PostEffectEditorInspector.startGroup("@@ - General");
|
||||
PostEffectEditorInspector.addField("$PostFXManager::Settings::Enabled@@", "Enabled", "bool", "", $PostFXManager::PostFX::Enable@@, "");
|
||||
PostEffectEditorInspector.endGroup();
|
||||
}
|
||||
|
||||
//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
|
||||
function @@::applyFromPreset(%this)
|
||||
{
|
||||
//@@ Settings
|
||||
$PostFXManager::PostFX::Enable@@ = $PostFXManager::Settings::Enabled@@;
|
||||
|
||||
if($PostFXManager::PostFX::Enable@@)
|
||||
%this.enable();
|
||||
else
|
||||
%this.disable();
|
||||
}
|
||||
|
||||
function @@::settingsApply(%this)
|
||||
{
|
||||
$PostFXManager::Settings::Enabled@@ = $PostFXManager::PostFX::Enable@@;
|
||||
}
|
||||
|
||||
//Our actual postFX
|
||||
singleton PostEffect( @@ )
|
||||
{
|
||||
isEnabled = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue