2019-06-03 07:47:30 +00:00
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
function ESettingsWindow::startup( %this )
{
2019-06-17 07:30:45 +00:00
new ArrayObject(EditorSettingsPageList);
new ArrayObject(GameSettingsPageList);
%this.addEditorSettingsPage("Axis", "Axis Gizmo");
%this.addEditorSettingsPage("General", "General Settings");
%this.addEditorSettingsPage("Camera", "Camera Settings");
%this.addEditorSettingsPage("SceneEditor", "Scene Editor");
%this.addEditorSettingsPage("ShapeEditor", "Shape Editor");
%this.addEditorSettingsPage("NavEditor", "Navigation Editor");
%this.addEditorSettingsPage("Theme", "Theme");
2019-10-20 07:47:15 +00:00
%this.addEditorSettingsPage("AssetEditing", "Asset Editing");
2020-09-11 07:28:15 +00:00
%this.addEditorSettingsPage("PostFX", "Post Effects");
2019-06-17 07:30:45 +00:00
%this.addGameSettingsPage("GameGeneral", "General");
%this.addGameSettingsPage("Gameplay", "Gameplay");
%this.addGameSettingsPage("Paths", "Paths");
%this.addGameSettingsPage("UI", "UI");
%this.addGameSettingsPage("LevelDefaults", "Level Defaults");
%this.addGameSettingsPage("GameOptions", "Game Options");
%this.addGameSettingsPage("AssetManagement", "Asset Management");
%this.mode = "Editor";
2019-06-03 07:47:30 +00:00
}
function ESettingsWindow::onWake( %this )
{
}
function ESettingsWindow::hideDialog( %this )
{
%this.setVisible(false);
}
function ESettingsWindow::ToggleVisibility()
{
2019-06-18 04:48:20 +00:00
if ( ESettingsWindow.visible )
2019-06-03 07:47:30 +00:00
{
ESettingsWindow.setVisible(false);
}
else
{
ESettingsWindow.setVisible(true);
ESettingsWindow.selectWindow();
ESettingsWindow.setCollapseGroup(false);
2019-06-18 04:48:20 +00:00
ESettingsWindowList.clear();
2019-06-03 07:47:30 +00:00
}
ESettingsWindowList.setSelectedById( 1 );
}
2019-06-17 07:30:45 +00:00
function ESettingsWindow::toggleProjectSettings(%this)
2019-06-03 07:47:30 +00:00
{
2019-06-17 07:30:45 +00:00
%this.ToggleVisibility();
%count = GameSettingsPageList.count();
for(%i=0; %i < %count; %i++)
{
%settingsPageText = GameSettingsPageList.getValue(%i);
ESettingsWindowList.addRow( %i, %settingsPageText );
}
2019-06-03 07:47:30 +00:00
ESettingsWindowList.sort(0);
2019-06-17 07:30:45 +00:00
%this.mode = "Project";
ESettingsWindow.text = "Game Project Settings";
2019-06-18 04:48:20 +00:00
ESettingsWindowList.setSelectedById( 1 );
2019-06-17 07:30:45 +00:00
}
2019-06-03 07:47:30 +00:00
2019-06-17 07:30:45 +00:00
function ESettingsWindow::toggleEditorSettings(%this)
2019-06-03 07:47:30 +00:00
{
2019-06-17 07:30:45 +00:00
%this.ToggleVisibility();
2019-06-03 07:47:30 +00:00
2019-06-17 07:30:45 +00:00
%count = EditorSettingsPageList.count();
for(%i=0; %i < %count; %i++)
{
%settingsPageText = EditorSettingsPageList.getValue(%i);
ESettingsWindowList.addRow( %i, %settingsPageText );
}
2019-06-03 07:47:30 +00:00
ESettingsWindowList.sort(0);
2019-06-17 07:30:45 +00:00
%this.mode = "Editor";
ESettingsWindow.text = "Editor Settings";
2019-06-18 04:48:20 +00:00
ESettingsWindowList.setSelectedById( 1 );
2019-06-17 07:30:45 +00:00
}
function ESettingsWindow::addEditorSettingsPage(%this, %settingsPageName, %settingsPageText)
{
EditorSettingsPageList.add(%settingsPageName, %settingsPageText);
}
function ESettingsWindow::addGameSettingsPage(%this, %settingsPageName, %settingsPageText)
{
GameSettingsPageList.add(%settingsPageName, %settingsPageText);
2019-06-03 07:47:30 +00:00
}
2019-10-05 06:16:14 +00:00
function ESettingsWindow::refresh(%this)
{
if(ESettingsWindow.selectedPageId !$= "")
{
ESettingsWindowList.setSelectedById( ESettingsWindow.selectedPageId );
}
else
{
ESettingsWindowList.setSelectedById( 1 );
}
}
2019-06-03 07:47:30 +00:00
//-----------------------------------------------------------------------------
function ESettingsWindowList::onSelect( %this, %id, %text )
{
SettingsInspector.clearFields();
2019-06-17 07:30:45 +00:00
if(ESettingsWindow.mode $= "Editor")
%pageName = EditorSettingsPageList.getKey(EditorSettingsPageList.getIndexFromValue(%text));
else
%pageName = GameSettingsPageList.getKey(GameSettingsPageList.getIndexFromValue(%text));
2019-06-03 07:47:30 +00:00
eval("ESettingsWindow.get" @ %pageName @ "Settings();");
2019-10-05 06:16:14 +00:00
ESettingsWindow.selectedPageId = %id;
ESettingsWindow.selectedPageText = %text;
2019-06-03 07:47:30 +00:00
}
2019-06-17 07:30:45 +00:00
//Read/write field functions
function SettingsInspector::addSettingsField(%this, %settingsFieldName, %labelText, %fieldType, %tooltip, %fieldData)
{
%moddedSettingsFieldName = strreplace(%settingsFieldName, "/", "-");
if(ESettingsWindow.mode $= "Editor")
%this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", EditorSettings.value(%settingsFieldName), %fieldData, "changeEditorSetting");
else
%this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", ProjectSettings.value(%settingsFieldName), %fieldData, "changeEditorSetting");
}
function SettingsInspector::changeEditorSetting(%this, %varName, %value)
{
%varName = strreplace(%varName, "-", "/");
2019-10-05 06:16:14 +00:00
if(%value !$= "" && (fileExt(%value) !$= "" || IsDirectory(%value)))
2019-08-29 05:22:33 +00:00
{
%value = makeFullPath(%value);
}
2019-10-05 06:16:14 +00:00
//echo("Set " @ %varName @ " to be " @ %value);
if(ESettingsWindow.mode $= "Editor")
%oldValue = EditorSettings.value(%varName);
else
%oldValue = ProjectSettings.value(%varName);
2019-06-17 07:30:45 +00:00
if(ESettingsWindow.mode $= "Editor")
EditorSettings.setValue(%varName, %value);
else
ProjectSettings.setValue(%varName, %value);
if(ESettingsWindow.mode $= "Editor")
2019-12-08 21:54:37 +00:00
{
2019-06-17 07:30:45 +00:00
%success = EditorSettings.write();
2019-12-08 21:54:37 +00:00
//Bit of a hack, but if we were editing the theme, reexec the profiles for GUI
if(ESettingsWindow.selectedPageText $= "Theme")
2021-01-07 11:01:09 +00:00
exec("tools/gui/profiles.ed." @ $TorqueScriptFileExtension);
2019-12-08 21:54:37 +00:00
}
2019-06-17 07:30:45 +00:00
else
%success = ProjectSettings.write();
2019-10-05 06:16:14 +00:00
if(%oldValue !$= %value)
2019-10-20 07:47:15 +00:00
ESettingsWindow.schedule(15,"refresh");
2019-06-17 07:30:45 +00:00
}
2019-06-18 04:48:20 +00:00
function GuiInspectorVariableGroup::buildOptionsSettingField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %ownerObj)
{
%extent = 200;
%fieldCtrl = %this.createInspectorField();
%fieldCtrl.setHeightOverride(true, 200);
%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;
};
//set the field value
if(getSubStr(%this.fieldName, 0, 1) $= "$")
{
if(%fieldName $= "")
%editControl.setText(%fieldName);
}
else
{
//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);
%this.addInspectorField(%fieldCtrl);
}
2019-06-17 07:30:45 +00:00
//
// COMMON EDITOR SETTINGS
//
2019-06-03 07:47:30 +00:00
function ESettingsWindow::getAxisSettings(%this)
{
SettingsInspector.startGroup("Gizmo");
SettingsInspector.addSettingsField("AxisGizmo/mouseRotateScalar", "Rotate Scalar", "float", "");
SettingsInspector.addSettingsField("AxisGizmo/mouseScaleScalar", "Scale Scalar", "float", "");
SettingsInspector.addSettingsField("AxisGizmo/renderWhenUsed", "Render When Manipulated", "bool", "");
SettingsInspector.addSettingsField("AxisGizmo/renderInfoText", "Render Tool Text", "bool", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Grid");
SettingsInspector.addSettingsField("AxisGizmo/Grid/renderPlane", "Render Plane", "bool", "");
SettingsInspector.addSettingsField("AxisGizmo/Grid/renderPlaneHashes", "Render Plane Hashes", "bool", "");
SettingsInspector.addSettingsField("AxisGizmo/Grid/planeDim", "Plane Size", "float", "");
SettingsInspector.addSettingsField("AxisGizmo/Grid/gridColor", "Plane Color", "colorI", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getGeneralSettings(%this)
{
2021-09-10 07:13:56 +00:00
SettingsInspector.startGroup("Level Load");
SettingsInspector.addSettingsField("WorldEditor/LevelLoad/LoadMode", "Editor Startup Scene", "list", "When the editor loads, this setting dictates what scene is loaded first",
"Last Edited Level,Editor Default Scene");
SettingsInspector.endGroup();
2020-08-30 09:59:26 +00:00
SettingsInspector.startGroup("Autosave");
SettingsInspector.addSettingsField("WorldEditor/AutosaveInterval", "Autosave Interval(in minutes)", "int", "");
SettingsInspector.endGroup();
2019-06-03 07:47:30 +00:00
SettingsInspector.startGroup("Paths");
SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Torsion Path", "filename", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Theme");
SettingsInspector.addSettingsField("WorldEditor/Theme/backgroundColor", "Background Color", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Theme/windowTitleBGColor", "Window Title Color", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Theme/windowTitleFontColor", "Window Title Text Color", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Theme/mainTextColor", "Main Text Color", "colorI", "");
SettingsInspector.endGroup();
2019-10-20 07:47:15 +00:00
SettingsInspector.startGroup("Layout");
2020-08-30 09:59:26 +00:00
/*SettingsInspector.addSettingsField("WorldEditor/Layout/LayoutMode", "Editor Layout Mode", "list", "This dictates which layout style the editor should use." @
2019-10-20 07:47:15 +00:00
"WARNING - Modern layout is highlight experimental." @
2020-08-30 09:59:26 +00:00
"Updating this requires a restart of the program", "Classic,Modern");*/
2019-10-20 07:47:15 +00:00
SettingsInspector.endGroup();
2019-06-03 07:47:30 +00:00
}
function ESettingsWindow::getCameraSettings(%this)
{
SettingsInspector.startGroup("Mouse Control");
SettingsInspector.addSettingsField("Camera/invertYAxis", "Invert Y Axis", "bool", "");
SettingsInspector.addSettingsField("Camera/invertXAxis", "Invert X Axis", "bool", "");
SettingsInspector.endGroup();
//Based on currently loaded level(rootScene)
SettingsInspector.startGroup(EditorSettings.value("WorldEditor/newLevelFile") @ " Camera");
2020-08-30 09:59:26 +00:00
SettingsInspector.addSettingsField("Camera/cameraMinSpeed", "Camera Speed Min", "float", "");
SettingsInspector.addSettingsField("Camera/cameraMaxSpeed", "Camera Speed Max", "200", "");
2019-06-03 07:47:30 +00:00
SettingsInspector.endGroup();
}
function ESettingsWindow::getNavEditorSettings(%this)
{
SettingsInspector.startGroup("Test Spawn");
2020-08-30 09:59:26 +00:00
SettingsInspector.addSettingsField("NavEditor/SpawnClass", "Spawn Class", "list", "", "AIPlayer");
SettingsInspector.addSettingsField("NavEditor/SpawnDatablock", "Datablock", "string", "");
2019-06-03 07:47:30 +00:00
SettingsInspector.endGroup();
SettingsInspector.startGroup("Colors");
2020-08-30 09:59:26 +00:00
SettingsInspector.addSettingsField("NavEditor/HoverSplineColor", "Hover Spline", "colorI", "");
SettingsInspector.addSettingsField("NavEditor/SelectedSplineColor", "Select Spline", "colorI", "");
2019-06-03 07:47:30 +00:00
SettingsInspector.endGroup();
}
function ESettingsWindow::getSceneEditorSettings(%this)
{
SettingsInspector.startGroup("Render");
SettingsInspector.addSettingsField("WorldEditor/Render/renderObjHandle", "Object Icons", "bool", "");
SettingsInspector.addSettingsField("WorldEditor/Render/renderObjText", "Object Text", "bool", "");
SettingsInspector.addSettingsField("WorldEditor/Render/showMousePopupInfo", "Mouse Popup Info", "bool", "");
SettingsInspector.addSettingsField("WorldEditor/Render/renderPopupBackground", "Popup Menu Background", "bool", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Colors");
SettingsInspector.addSettingsField("WorldEditor/Grid/gridColor", "Grid Major", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Grid/gridMinorColor", "Grid Minor", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Grid/gridOriginColor", "Grid Origin", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Color/dragRectColor", "Drag Rect", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Color/objectTextColor", "Object Text", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Color/popupTextColor", "Popup Text", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Color/popupBackgroundColor", "Popup Back", "colorI", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Misc");
2019-11-18 09:30:04 +00:00
//SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", "");
2019-06-03 07:47:30 +00:00
SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", "");
SettingsInspector.endGroup();
2019-11-18 09:30:04 +00:00
SettingsInspector.startGroup("Layout");
SettingsInspector.addSettingsField("WorldEditor/forceSidebarToSide", "Force Sidebar Window(s) to side", "bool", "1");
SettingsInspector.endGroup();
2020-08-30 09:59:26 +00:00
SettingsInspector.startGroup("Behavior");
SettingsInspector.addSettingsField("WorldEditor/Tools/snapGround", "Snap Objects to Ground", "bool", "0");
SettingsInspector.addSettingsField("WorldEditor/Tools/TerrainSnapOffsetZ", "Add Offset of Terrain Snapping on Z Axis", "bool", "0");
SettingsInspector.addSettingsField("WorldEditor/Tools/OffsetZValue", "Offset Z Value", "float", "0.01");
SettingsInspector.addSettingsField("WorldEditor/Tools/snapSoft", "Do Soft Snap", "bool", "0");
SettingsInspector.addSettingsField("WorldEditor/Tools/snapSoftSize", "Soft Snap Size", "bool", "2");
SettingsInspector.addSettingsField("WorldEditor/Tools/boundingBoxCollision", "Use Bounding Box for Collision", "bool", "0");
SettingsInspector.addSettingsField("WorldEditor/Tools/objectsUseBoxCenter", "Objects Use Box Center", "bool", "1");
SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterScalar", "Drop at Sceen Center Scalar", "bool", "1");
SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterMax", "Drop at Screen Center Max Dist.", "float", "100");
2020-09-02 06:26:43 +00:00
SettingsInspector.addSettingsField("WorldEditor/Tools/UseGroupCenter", "Use Group Center when snapping", "bool", "0");
2020-08-30 09:59:26 +00:00
SettingsInspector.endGroup();
SettingsInspector.startGroup("Images");
SettingsInspector.addSettingsField("WorldEditor/Images/defaultHandle", "Default Handle Image", "string", "");
SettingsInspector.addSettingsField("WorldEditor/Images/lockedHandle", "Locked Handle Image", "string", "");
SettingsInspector.addSettingsField("WorldEditor/Images/selectHandle", "Selected Handle Image", "string", "");
SettingsInspector.endGroup();
2019-06-03 07:47:30 +00:00
}
function ESettingsWindow::getShapeEditorSettings(%this)
{
SettingsInspector.startGroup("Colors");
2020-08-30 09:59:26 +00:00
SettingsInspector.addSettingsField("ShapeEditor/SunDiffuseColor", "Sun Diffuse", "colorI", "");
SettingsInspector.addSettingsField("ShapeEditor/SunAmbientColor", "Sun Ambient", "colorI", "");
SettingsInspector.addSettingsField("ShapeEditor/BackgroundColor", "Background", "colorI", "");
2019-06-03 07:47:30 +00:00
SettingsInspector.endGroup();
SettingsInspector.startGroup("Grid");
2020-08-30 09:59:26 +00:00
SettingsInspector.addSettingsField("ShapeEditor/GridSize", "Grid Size", "float", "");
SettingsInspector.addSettingsField("ShapeEditor/GridDimension", "Grid Dimension", "vector2", "");
2019-06-03 07:47:30 +00:00
SettingsInspector.endGroup();
}
2019-06-17 07:30:45 +00:00
function ESettingsWindow::getThemeSettings(%this)
2019-06-03 07:47:30 +00:00
{
2019-06-17 07:30:45 +00:00
SettingsInspector.startGroup("Colors");
SettingsInspector.addSettingsField("Theme/headerColor", "Headerbar Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/windowBackgroundColor", "Window Background Color", "ColorI", "");
2019-06-03 07:47:30 +00:00
2019-06-17 07:30:45 +00:00
SettingsInspector.addSettingsField("Theme/tabsColor", "Tabs Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tabsHLColor", "Tabs Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tabsSELColor", "Tabs Selected Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/dividerDarkColor", "Divider Dark Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/dividerMidColor", "Divider Mid Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/dividerLightColor", "Divider Light Color", "ColorI", "");
2019-06-03 07:47:30 +00:00
2019-06-17 07:30:45 +00:00
SettingsInspector.addSettingsField("Theme/headerTextColor", "Header Text Color", "ColorI", "");
2019-06-03 07:47:30 +00:00
2019-06-17 07:30:45 +00:00
SettingsInspector.addSettingsField("Theme/fieldTextColor", "Field Text Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldTextHLColor", "Field Text Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldTextSELColor", "Field Text Selected Color", "ColorI", "");
2019-10-20 07:47:15 +00:00
SettingsInspector.addSettingsField("Theme/fieldTextNAColor", "Field Text N/A Color", "ColorI", "");
2019-06-17 07:30:45 +00:00
SettingsInspector.addSettingsField("Theme/fieldBGColor", "Field Background Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldBGHLColor", "Field Background Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldBGSELColor", "Field Background Selected Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tooltipBGColor", "Tooltip Background Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tooltipTextColor", "Tooltip Text Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tooltipDivColor", "Tooltip Divider Color", "ColorI", "");
SettingsInspector.endGroup();
}
2020-09-11 07:28:15 +00:00
function ESettingsWindow::getPostFXSettings(%this)
{
SettingsInspector.startGroup("Post Effects");
SettingsInspector.addField("Edit Default PostFX", "Edit Default PostFX Config", "button", "Edit Default PostFX Config", "", "PostFXEditor.editDefaultPostFXSettings();");
SettingsInspector.endGroup();
}
2019-06-17 07:30:45 +00:00
//
// COMMON GAME SETTINGS
//
function ESettingsWindow::getGameGeneralSettings(%this)
{
SettingsInspector.startGroup("General");
SettingsInspector.addSettingsField("General/ProjectName", "Project Name", "string", "");
Updated path handling for loose asset files for CPP, Image, Level, Material, PostFX, Shape, Terrain, TerrainMat and StateMachine assets to be more predictable in when and how they expando the loose file path into a full, useable path
Fixed loose file bindings for all associated slots in level asset, such as postFX file, decals, etc
Expanded TSStatic onInspect testcase to parse materialSlots and hook-in a specialized material field for editing/quick reference from the inspector
Adjusted expand behavior of guiTree to be more reliable
Added internal name 'stack' to inspectorGroup's stack child objects for easier access to add programatic fields
Removed redundant PreMult translucency type code
Added setting of feature so probes work when in forward/basic lit mode
Corrected indexing error in SQLiteObject class so it properly parses with the updated console API
Tweaked the FOV setting logic in GameConnection::onControlObjectChange to not be spammy
Fixed var when trying to bind the camera to the client
Added project setting field to dictate the default render mode between Forward or Deferred
Integrated MotionBlur PostFX into updated PostFX Editor paradigm and exposed the samples uniform as an editable field
Integrated DOF PostFX into updated PostFX Editor paradigm
Updated setting group name for vignette postFX
Shifted shaderCache to be in data/cache along with other cached files
Added helper function to replace strings in a file
Fixed ExampleCppObject asset to have correct loose file references
Adjusted editor default level logic so it can be modifed and then stored, as well as reset back to the original default
Fixed verve reference to root scene group
Adjusted location of a nonmodal gui profile so it loads at the correct time
Reorganized AssetBrowser loading and refresh logic so it doesn't stack multiple refresh requests back-to-back causing lag
Updated the search behavior to search not just the current address, but all child folders as well, making it far more useful
Initial work into zip and folder drag-and-drop asset importing support
Removed the import config setting for 'always display material maps' as it is redundant with the new importer context menu actions
Updated example asset type file
Ensured all asset types have proper handling for move, rename and delete actions
Fixed double-click behavior on folders in the AB
Fixed CPP asset preview
Added better logic to discern if a top-level folder belongs to a module or not in the AB directory browser
Added ability to convert a non-module top-level folder in the AB into a module
Added initial hooks for being able to generate a new Editor Tool, similar to how the AB can generate modules
Renamed CPP asset template files to have the .template so they aren't accidentally picked up by cmake
Fixed convex editor's material handling to work with AB and reference back properly
Updated AB images for folder up/down navigation buttons, and the breadcrumb divider arrow
Made PostFX Editor properly allow for input pass-through so you can still edit the level with it open
Added some additional common text gui profiles
Disabled calls to old editor settings logic in various editors to remove spam
Added callOnModules call so tools can initialize properly when the world editor is opened
Fixed logic test for visualizers
Added ability for cmake to scan tools directory for any tools that add source files
2020-02-04 07:47:28 +00:00
SettingsInspector.addSettingsField("General/LightingMode", "Lighting Mode", "list", "Dictates the lighting mode the project uses", "Deferred,Forward");
2019-06-17 07:30:45 +00:00
SettingsInspector.endGroup();
}
function ESettingsWindow::getPathsSettings(%this)
{
SettingsInspector.startGroup("Paths");
SettingsInspector.addSettingsField("Paths/splashImagePath", "Splash Image", "filename", "");
SettingsInspector.addSettingsField("Paths/iconImagePath", "Icon Image", "filename", "");
SettingsInspector.addSettingsField("Paths/missingTexturePath", "Missing Texture Image", "filename", "");
SettingsInspector.addSettingsField("Paths/noMaterialPath", "No Material Image", "filename", "");
SettingsInspector.addSettingsField("Paths/errorMaterialMath", "Error Material Image", "filename", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getUISettings(%this)
{
SettingsInspector.startGroup("UI");
SettingsInspector.addSettingsField("UI/playGUIName", "Play GUI Name", "string", "");
SettingsInspector.addSettingsField("UI/mainMenuName", "Main Menu GUI Name", "string", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getAssetManagementSettings(%this)
{
SettingsInspector.startGroup("Modules");
SettingsInspector.addSettingsField("AssetManagement/Modules/coreModulePath", "Core Module Path", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Modules/gameDataModulePath", "Game Data Module Path", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Modules/moduleExtension", "Module Extension", "string", "");
2020-04-05 06:28:34 +00:00
%moduleList = ModuleDatabase.findModules(true);
%moduleList = strreplace(%moduleList, " ", ",");
SettingsInspector.addSettingsField("AssetManagement/Modules/DefaultModule", "Default Module", "list", %moduleList);
2019-06-17 07:30:45 +00:00
SettingsInspector.endGroup();
SettingsInspector.startGroup("Assets");
SettingsInspector.addSettingsField("AssetManagement/Assets/assetExtension", "Asset Extension", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Assets/datablockCaching", "Cache Datablocks", "bool", "");
//SettingsInspector.addSettingsField("AssetManagement/Assets/moduleExtension", "Module Extension", "string", "");
2019-10-20 07:47:15 +00:00
2019-06-17 07:30:45 +00:00
SettingsInspector.endGroup();
}
2019-10-20 07:47:15 +00:00
function ESettingsWindow::getAssetEditingSettings(%this)
{
ImportAssetWindow::reloadImportOptionConfigs();
Misc Quality of Life and Bug fixes
Added handling for if preview images on image assets fails to generate, will fallback to using the full image
Added handling for double clicking or drag-n-dropping terrain assets to create them
Improved handling of field labels in variable inspector by making the stringtable be case sensitive.
Added editor settings for handling of asset double click behavior. Can now select between Edit Asset and Spawn Asset. Support is asset type dependent.
Added editor setting for auto-importing loose files when navigating to a folder. If on and the user has flagged to also enable auto-import generally, will auto import all unaffiliated loose files in as assets.
Added editor setting for default module to use when creating new assets. Updated various tooling logic so when creating a new material, if this and the 'Always Prompt Module Target' setting is off, it will fill in the target module and target asset path info based on the default module.
Fixed issue with editors that use managedData scripts where if the path didn't exist, the script file wouldn't be made.
Fixed display issue in terrain editor where if you clear the detail map, the normal/macro/orm maps would disable, but not also clear.
Fixed handling of cleared maps in terrain editor so it no longer fills empty maps in with the no image image.
Fixed handling of creating new material where it would fill in the diffuse with a no texture image as the default.
Fixed issue where canceling out of creating a module would still prompt to create the common default folders.
Fixed issue where the Select Module window couldn't be closed via the cancel or x buttons.
Based on feedback, reduced default size of the Text Pad window.
Fixed issue where the Drop At menu list wouldn't correctly display which item was marked after it was changed.
Fixed spawning shape asset handling so it uses whatever the editor's Drop At setting is.
Improved themeing of regular bitmap buttons in the editor.
Based on feedback, flipped layout of Target Module and Target Path in the Create New Asset window.
Improved handling of setting up the Target Path for when creating new assets. If a path is not set, and the user has a Default Module, it will default the path to that module.
2021-08-28 23:51:27 +00:00
//First, get our list of modules
%moduleList = ModuleDatabase.findModules();
%formattedModuleList = "";
%count = getWordCount(%moduleList);
for(%i=0; %i < %count; %i++)
{
%module = getWord(%moduleList, %i);
if(%module.group !$= "Tools" && %module.group !$= "Core")
{
if(%formattedModuleList $= "")
%formattedModuleList = %module.moduleId;
else
%formattedModuleList = %formattedModuleList @ "," @ %module.moduleId;
}
}
SettingsInspector.startGroup("Asset Creation");
SettingsInspector.addSettingsField("Assets/New/defaultModule", "Default Module", "list", "Default Module for new assets to be created into", %formattedModuleList);
SettingsInspector.addSettingsField("Assets/New/alwaysPromptModuleTarget", "Always Prompt Target Module", "bool", "If off, use the default module");
SettingsInspector.endGroup();
2019-10-20 07:47:15 +00:00
for(%i=0; %i < ImportAssetWindow.importConfigsList.Count(); %i++)
{
%configName = ImportAssetWindow.importConfigsList.getKey(%i);
%formattedConfigList = %i == 0 ? %configName : %formattedConfigList @ "," @ %configName;
}
SettingsInspector.startGroup("Assets Importing");
2019-12-03 06:09:18 +00:00
SettingsInspector.addField("Edit Asset Configs", "Edit Asset Import Configs", "button", "Open Asset Import Config Editor", "", "Canvas.pushDialog(AssetImportConfigEditor);");
SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList);
2019-10-20 07:47:15 +00:00
SettingsInspector.addSettingsField("Assets/AutoImport", "Automatically Import using default config", "bool", "If on, the asset importing process" @
"will attempt to automatically import any inbound assets"@
"using the default config, without prompting the import window."@
"The window will still display if any issues are detected", "");
Misc Quality of Life and Bug fixes
Added handling for if preview images on image assets fails to generate, will fallback to using the full image
Added handling for double clicking or drag-n-dropping terrain assets to create them
Improved handling of field labels in variable inspector by making the stringtable be case sensitive.
Added editor settings for handling of asset double click behavior. Can now select between Edit Asset and Spawn Asset. Support is asset type dependent.
Added editor setting for auto-importing loose files when navigating to a folder. If on and the user has flagged to also enable auto-import generally, will auto import all unaffiliated loose files in as assets.
Added editor setting for default module to use when creating new assets. Updated various tooling logic so when creating a new material, if this and the 'Always Prompt Module Target' setting is off, it will fill in the target module and target asset path info based on the default module.
Fixed issue with editors that use managedData scripts where if the path didn't exist, the script file wouldn't be made.
Fixed display issue in terrain editor where if you clear the detail map, the normal/macro/orm maps would disable, but not also clear.
Fixed handling of cleared maps in terrain editor so it no longer fills empty maps in with the no image image.
Fixed handling of creating new material where it would fill in the diffuse with a no texture image as the default.
Fixed issue where canceling out of creating a module would still prompt to create the common default folders.
Fixed issue where the Select Module window couldn't be closed via the cancel or x buttons.
Based on feedback, reduced default size of the Text Pad window.
Fixed issue where the Drop At menu list wouldn't correctly display which item was marked after it was changed.
Fixed spawning shape asset handling so it uses whatever the editor's Drop At setting is.
Improved themeing of regular bitmap buttons in the editor.
Based on feedback, flipped layout of Target Module and Target Path in the Create New Asset window.
Improved handling of setting up the Target Path for when creating new assets. If a path is not set, and the user has a Default Module, it will default the path to that module.
2021-08-28 23:51:27 +00:00
SettingsInspector.addSettingsField("Assets/AutoImportLooseFiles", "Automatically Import Loose Files", "bool", "If on, will automatically import unassociated loose files in assets when navigating the Asset Browser.", "");
2019-10-20 07:47:15 +00:00
SettingsInspector.endGroup();
SettingsInspector.startGroup("Asset Browser");
SettingsInspector.addSettingsField("Assets/Browser/showCoreModule", "Show Core Module in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showToolsModule", "Show Tools Module in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showOnlyPopulatedModule", "Show Only Modules with Assets in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showFolders", "Show Folders in Tiles view in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showEmptyFolders", "Show Empty Folders in Tiles view in Asset Browser", "bool", "");
2020-07-11 21:49:06 +00:00
SettingsInspector.addSettingsField("Assets/Browser/showLooseFiles", "Show Loose Files when viewing in Asset Browser", "bool", "");
2020-04-05 06:28:34 +00:00
SettingsInspector.addSettingsField("AssetManagement/Assets/promptOnRename", "Prompt on Rename", "bool", "");
Misc Quality of Life and Bug fixes
Added handling for if preview images on image assets fails to generate, will fallback to using the full image
Added handling for double clicking or drag-n-dropping terrain assets to create them
Improved handling of field labels in variable inspector by making the stringtable be case sensitive.
Added editor settings for handling of asset double click behavior. Can now select between Edit Asset and Spawn Asset. Support is asset type dependent.
Added editor setting for auto-importing loose files when navigating to a folder. If on and the user has flagged to also enable auto-import generally, will auto import all unaffiliated loose files in as assets.
Added editor setting for default module to use when creating new assets. Updated various tooling logic so when creating a new material, if this and the 'Always Prompt Module Target' setting is off, it will fill in the target module and target asset path info based on the default module.
Fixed issue with editors that use managedData scripts where if the path didn't exist, the script file wouldn't be made.
Fixed display issue in terrain editor where if you clear the detail map, the normal/macro/orm maps would disable, but not also clear.
Fixed handling of cleared maps in terrain editor so it no longer fills empty maps in with the no image image.
Fixed handling of creating new material where it would fill in the diffuse with a no texture image as the default.
Fixed issue where canceling out of creating a module would still prompt to create the common default folders.
Fixed issue where the Select Module window couldn't be closed via the cancel or x buttons.
Based on feedback, reduced default size of the Text Pad window.
Fixed issue where the Drop At menu list wouldn't correctly display which item was marked after it was changed.
Fixed spawning shape asset handling so it uses whatever the editor's Drop At setting is.
Improved themeing of regular bitmap buttons in the editor.
Based on feedback, flipped layout of Target Module and Target Path in the Create New Asset window.
Improved handling of setting up the Target Path for when creating new assets. If a path is not set, and the user has a Default Module, it will default the path to that module.
2021-08-28 23:51:27 +00:00
SettingsInspector.addSettingsField("Assets/Browser/doubleClickAction", "Double Click Action", "list", "Dictates what sort of action double clicking on an asset in the Browser will invoke", "Edit Asset,Spawn Asset");
2021-09-01 06:12:16 +00:00
SettingsInspector.addSettingsField("AssetManagement/Assets/closeBrowserOnDragAction", "Close Browser on Drag Action", "bool", "If on, the Asset Browser will automatically close after dragging an asset from it to the editor interface.");
2019-10-20 07:47:15 +00:00
SettingsInspector.endGroup();
}
2019-06-17 07:30:45 +00:00
function ESettingsWindow::getGameplaySettings(%this)
{
SettingsInspector.startGroup("Game Modes");
SettingsInspector.addSettingsField("Gameplay/GameModes/defaultModeName", "Default Gamemode Name", "string", "");
SettingsInspector.endGroup();
2019-08-07 06:27:39 +00:00
}
2019-06-17 07:30:45 +00:00
function ESettingsWindow::getGameOptionsSettings(%this)
{
2019-06-18 04:48:20 +00:00
SettingsInspector.startGroup("Options Settings");
SettingsInspector.addSettingsField("Options/optionsList", "OptionsList", "OptionsSetting", "");
2019-06-17 07:30:45 +00:00
SettingsInspector.endGroup();
2021-08-02 09:20:27 +00:00
}