mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
commit
39f0e269d6
48 changed files with 317 additions and 102 deletions
|
|
@ -252,7 +252,7 @@ function parseMissionGroupForIds( %className, %childGroup )
|
|||
if( (%currentGroup).getObject(%i).getClassName() $= "SimGroup" )
|
||||
%classIds = %classIds @ parseMissionGroupForIds( %className, (%currentGroup).getObject(%i).getId());
|
||||
}
|
||||
return %classIds;
|
||||
return trim( %classIds );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -20,11 +20,13 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$PostFXManager::Settings::EnableVignette = "0";
|
||||
$PostFXManager::Settings::EnableDOF = "0";
|
||||
$PostFXManager::Settings::EnabledSSAO = "0";
|
||||
$PostFXManager::Settings::EnableHDR = "0";
|
||||
$PostFXManager::Settings::EnableLightRays = "0";
|
||||
$PostFXManager::Settings::EnablePostFX = "0";
|
||||
$PostFXManager::Settings::Vignette::VMax = "0.6";
|
||||
$PostFXManager::Settings::DOF::BlurCurveFar = "";
|
||||
$PostFXManager::Settings::DOF::BlurCurveNear = "";
|
||||
$PostFXManager::Settings::DOF::BlurMax = "";
|
||||
|
|
|
|||
|
|
@ -298,6 +298,9 @@ function PostFXManager::settingsApplyFromPreset(%this)
|
|||
$DOFPostFx::FocusRangeMax = $PostFXManager::Settings::DOF::FocusRangeMax;
|
||||
$DOFPostFx::BlurCurveNear = $PostFXManager::Settings::DOF::BlurCurveNear;
|
||||
$DOFPostFx::BlurCurveFar = $PostFXManager::Settings::DOF::BlurCurveFar;
|
||||
|
||||
//Vignette settings
|
||||
$VignettePostEffect::VMax = $PostFXManager::Settings::Vignette::VMax;
|
||||
|
||||
if ( $PostFXManager::forceEnableFromPresets )
|
||||
{
|
||||
|
|
@ -392,6 +395,8 @@ function PostFXManager::settingsApplyDOF(%this)
|
|||
|
||||
function PostFXManager::settingsApplyVignette(%this)
|
||||
{
|
||||
$PostFXManager::Settings::Vignette::VMax = $VignettePostEffect::VMax;
|
||||
|
||||
postVerbose("% - PostFX Manager - Settings Saved - Vignette");
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@ function ForestEditorGui::onActiveForestUpdated( %this, %forest, %createNew )
|
|||
/// Called from a message box when a forest is not found.
|
||||
function ForestEditorGui::createForest( %this )
|
||||
{
|
||||
if ( isObject( theForest ) )
|
||||
%forestObject = parseMissionGroupForIds("Forest", "");
|
||||
|
||||
if ( isObject( %forestObject ) )
|
||||
{
|
||||
error( "Cannot create a second 'theForest' Forest!" );
|
||||
return;
|
||||
|
|
@ -64,8 +66,42 @@ function ForestEditorGui::createForest( %this )
|
|||
};
|
||||
|
||||
MECreateUndoAction::submit( theForest );
|
||||
|
||||
ForestEditorInspector.inspect( theForest );
|
||||
|
||||
ForestEditorGui.setActiveForest( theForest );
|
||||
|
||||
//Re-initialize the editor settings so we can start using it immediately.
|
||||
%tool = ForestEditorGui.getActiveTool();
|
||||
if ( isObject( %tool ) )
|
||||
%tool.onActivated();
|
||||
|
||||
if ( %tool == ForestTools->SelectionTool )
|
||||
{
|
||||
%mode = GlobalGizmoProfile.mode;
|
||||
switch$ (%mode)
|
||||
{
|
||||
case "None":
|
||||
ForestEditorSelectModeBtn.performClick();
|
||||
case "Move":
|
||||
ForestEditorMoveModeBtn.performClick();
|
||||
case "Rotate":
|
||||
ForestEditorRotateModeBtn.performClick();
|
||||
case "Scale":
|
||||
ForestEditorScaleModeBtn.performClick();
|
||||
}
|
||||
}
|
||||
else if ( %tool == ForestTools->BrushTool )
|
||||
{
|
||||
%mode = ForestTools->BrushTool.mode;
|
||||
switch$ (%mode)
|
||||
{
|
||||
case "Paint":
|
||||
ForestEditorPaintModeBtn.performClick();
|
||||
case "Erase":
|
||||
ForestEditorEraseModeBtn.performClick();
|
||||
case "EraseSelected":
|
||||
ForestEditorEraseSelectedModeBtn.performClick();
|
||||
}
|
||||
}
|
||||
|
||||
EWorldEditor.isDirty = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,6 +141,13 @@ function ForestEditorPlugin::onActivated( %this )
|
|||
ForestEditorPropertiesWindow.setVisible( true );
|
||||
ForestEditorGui.makeFirstResponder( true );
|
||||
//ForestEditToolbar.setVisible( true );
|
||||
|
||||
//Get our existing forest object in our current mission if we have one
|
||||
%forestObject = parseMissionGroupForIds("Forest", "");
|
||||
if(isObject(%forestObject))
|
||||
{
|
||||
ForestEditorGui.setActiveForest(%forestObject.getName());
|
||||
}
|
||||
|
||||
%this.map.push();
|
||||
Parent::onActivated(%this);
|
||||
|
|
@ -232,9 +239,27 @@ function ForestEditorPlugin::clearDirty( %this )
|
|||
function ForestEditorPlugin::onSaveMission( %this, %missionFile )
|
||||
{
|
||||
ForestDataManager.saveDirty();
|
||||
|
||||
if ( isObject( theForest ) )
|
||||
theForest.saveDataFile();
|
||||
|
||||
//First, find out if we have an existing forest object
|
||||
%forestObject = parseMissionGroupForIds("Forest", "");
|
||||
|
||||
if ( isObject( %forestObject ) )
|
||||
{
|
||||
//We do. Next, see if we have a file already by polling the datafield.
|
||||
if(%forestObject.dataFile !$= "")
|
||||
{
|
||||
//If we do, just save to the provided file.
|
||||
%forestObject.saveDataFile(%forestObject.dataFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
//We don't, so we'll save in the same place as the mission file and give it the missionpath\missionName.forest
|
||||
//naming convention.
|
||||
%path = filePath(%missionFile);
|
||||
%missionName = fileBase(%missionFile);
|
||||
%forestObject.saveDataFile(%path @ "/" @ %missionName @ ".forest");
|
||||
}
|
||||
}
|
||||
|
||||
ForestBrushGroup.save( "art/forest/brushes.cs" );
|
||||
}
|
||||
|
|
|
|||
BIN
Templates/Empty/game/tools/gui/images/expand-toolbar_d.png
Normal file
BIN
Templates/Empty/game/tools/gui/images/expand-toolbar_d.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 309 B |
BIN
Templates/Empty/game/tools/gui/images/expand-toolbar_h.png
Normal file
BIN
Templates/Empty/game/tools/gui/images/expand-toolbar_h.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 477 B |
BIN
Templates/Empty/game/tools/gui/images/expand-toolbar_n.png
Normal file
BIN
Templates/Empty/game/tools/gui/images/expand-toolbar_n.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 452 B |
Loading…
Add table
Add a link
Reference in a new issue