mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-28 15:55:39 +00:00
Merge pull request #757 from Areloch/MiscFixes0220404
Misc Fixes 2022/04/04
This commit is contained in:
commit
42e2eecee7
13 changed files with 112 additions and 24 deletions
|
|
@ -115,28 +115,28 @@ void GUIAsset::copyTo(SimObject* object)
|
||||||
|
|
||||||
void GUIAsset::initializeAsset()
|
void GUIAsset::initializeAsset()
|
||||||
{
|
{
|
||||||
mGUIPath = getOwned() ? expandAssetFilePath(mGUIFile) : mGUIPath;
|
|
||||||
|
|
||||||
if (Torque::FS::IsScriptFile(mGUIPath))
|
|
||||||
Con::executeFile(mGUIPath, false, false);
|
|
||||||
|
|
||||||
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
|
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
|
||||||
|
|
||||||
if (Torque::FS::IsScriptFile(mScriptPath))
|
if (Torque::FS::IsScriptFile(mScriptPath))
|
||||||
Con::executeFile(mScriptPath, false, false);
|
Con::executeFile(mScriptPath, false, false);
|
||||||
|
|
||||||
|
mGUIPath = getOwned() ? expandAssetFilePath(mGUIFile) : mGUIPath;
|
||||||
|
|
||||||
|
if (Torque::FS::IsScriptFile(mGUIPath))
|
||||||
|
Con::executeFile(mGUIPath, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUIAsset::onAssetRefresh()
|
void GUIAsset::onAssetRefresh()
|
||||||
{
|
{
|
||||||
mGUIPath = getOwned() ? expandAssetFilePath(mGUIFile) : mGUIPath;
|
|
||||||
|
|
||||||
if (Torque::FS::IsScriptFile(mGUIPath))
|
|
||||||
Con::executeFile(mGUIPath, false, false);
|
|
||||||
|
|
||||||
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
|
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
|
||||||
|
|
||||||
if (Torque::FS::IsScriptFile(mScriptPath))
|
if (Torque::FS::IsScriptFile(mScriptPath))
|
||||||
Con::executeFile(mScriptPath, false, false);
|
Con::executeFile(mScriptPath, false, false);
|
||||||
|
|
||||||
|
mGUIPath = getOwned() ? expandAssetFilePath(mGUIFile) : mGUIPath;
|
||||||
|
|
||||||
|
if (Torque::FS::IsScriptFile(mGUIPath))
|
||||||
|
Con::executeFile(mGUIPath, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUIAsset::setGUIFile(const char* pScriptFile)
|
void GUIAsset::setGUIFile(const char* pScriptFile)
|
||||||
|
|
|
||||||
|
|
@ -391,6 +391,20 @@ DefineEngineMethod(LevelAsset, getDecalsPath, const char*, (), ,
|
||||||
return object->getDecalsPath();
|
return object->getDecalsPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DefineEngineMethod(LevelAsset, getForestPath, const char*, (), ,
|
||||||
|
"Gets the full path of the asset's defined forest file.\n"
|
||||||
|
"@return The string result of the forest path")
|
||||||
|
{
|
||||||
|
return object->getForestPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
DefineEngineMethod(LevelAsset, getNavmeshPath, const char*, (), ,
|
||||||
|
"Gets the full path of the asset's defined navmesh file.\n"
|
||||||
|
"@return The string result of the navmesh path")
|
||||||
|
{
|
||||||
|
return object->getNavmeshPath();
|
||||||
|
}
|
||||||
|
|
||||||
DefineEngineMethod(LevelAsset, loadDependencies, void, (), ,
|
DefineEngineMethod(LevelAsset, loadDependencies, void, (), ,
|
||||||
"Initiates the loading of asset dependencies for this level.")
|
"Initiates the loading of asset dependencies for this level.")
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -120,11 +120,12 @@ function AssetBrowser::moveLevelAsset(%this, %assetDef, %destination)
|
||||||
if(%newAssetPath $= "")
|
if(%newAssetPath $= "")
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
moveAssetLooseFile(%assetDef.getLevelPath(), %destination);
|
|
||||||
moveAssetLooseFile(%assetDef.getLevelPath(), %destination);
|
moveAssetLooseFile(%assetDef.getLevelPath(), %destination);
|
||||||
moveAssetLooseFile(%assetDef.getPreviewImagePath(), %destination);
|
moveAssetLooseFile(%assetDef.getPreviewImagePath(), %destination);
|
||||||
moveAssetLooseFile(%assetDef.getPostFXPresetPath(), %destination);
|
moveAssetLooseFile(%assetDef.getPostFXPresetPath(), %destination);
|
||||||
moveAssetLooseFile(%assetDef.getDecalsPath(), %destination);
|
moveAssetLooseFile(%assetDef.getDecalsPath(), %destination);
|
||||||
|
moveAssetLooseFile(%assetDef.getForestPath(), %destination);
|
||||||
|
moveAssetLooseFile(%assetDef.getNavmeshPath(), %destination);
|
||||||
|
|
||||||
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
|
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
|
||||||
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);
|
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);
|
||||||
|
|
|
||||||
|
|
@ -247,4 +247,12 @@ function ConvexEditorDefaultMaterialBtn::gotMaterialName(%this, %name)
|
||||||
ConvexEditorOptionsWindow.activeShape.setMaterial(%name);
|
ConvexEditorOptionsWindow.activeShape.setMaterial(%name);
|
||||||
|
|
||||||
ConvexEditorGui.updateShape();
|
ConvexEditorGui.updateShape();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::getConvexEditorSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Defaults");
|
||||||
|
SettingsInspector.addSettingsField("ConvexEditor/MaterialName", "Default Material", "string",
|
||||||
|
"The default material when creating a convexShape");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,14 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
// IN THE SOFTWARE.
|
// IN THE SOFTWARE.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
function ESettingsWindow::onAdd(%this)
|
||||||
function ESettingsWindow::startup( %this )
|
|
||||||
{
|
{
|
||||||
new ArrayObject(EditorSettingsPageList);
|
new ArrayObject(EditorSettingsPageList);
|
||||||
new ArrayObject(GameSettingsPageList);
|
new ArrayObject(GameSettingsPageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::startup( %this )
|
||||||
|
{
|
||||||
%this.addEditorSettingsPage("Axis", "Axis Gizmo");
|
%this.addEditorSettingsPage("Axis", "Axis Gizmo");
|
||||||
%this.addEditorSettingsPage("General", "General Settings");
|
%this.addEditorSettingsPage("General", "General Settings");
|
||||||
%this.addEditorSettingsPage("Camera", "Camera Settings");
|
%this.addEditorSettingsPage("Camera", "Camera Settings");
|
||||||
|
|
@ -303,13 +305,6 @@ function ESettingsWindow::getGeneralSettings(%this)
|
||||||
//SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Torsion Path", "filename", "");
|
//SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Torsion Path", "filename", "");
|
||||||
SettingsInspector.endGroup();
|
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();
|
|
||||||
|
|
||||||
SettingsInspector.startGroup("Layout");
|
SettingsInspector.startGroup("Layout");
|
||||||
/*SettingsInspector.addSettingsField("WorldEditor/Layout/LayoutMode", "Editor Layout Mode", "list", "This dictates which layout style the editor should use." @
|
/*SettingsInspector.addSettingsField("WorldEditor/Layout/LayoutMode", "Editor Layout Mode", "list", "This dictates which layout style the editor should use." @
|
||||||
"WARNING - Modern layout is highlight experimental." @
|
"WARNING - Modern layout is highlight experimental." @
|
||||||
|
|
@ -327,7 +322,7 @@ function ESettingsWindow::getCameraSettings(%this)
|
||||||
//Based on currently loaded level(rootScene)
|
//Based on currently loaded level(rootScene)
|
||||||
SettingsInspector.startGroup(EditorSettings.value("WorldEditor/newLevelFile") @ " Camera");
|
SettingsInspector.startGroup(EditorSettings.value("WorldEditor/newLevelFile") @ " Camera");
|
||||||
SettingsInspector.addSettingsField("Camera/cameraMinSpeed", "Camera Speed Min", "float", "");
|
SettingsInspector.addSettingsField("Camera/cameraMinSpeed", "Camera Speed Min", "float", "");
|
||||||
SettingsInspector.addSettingsField("Camera/cameraMaxSpeed", "Camera Speed Max", "200", "");
|
SettingsInspector.addSettingsField("Camera/cameraMaxSpeed", "Camera Speed Max", "float", "");
|
||||||
SettingsInspector.endGroup();
|
SettingsInspector.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -365,7 +360,8 @@ function ESettingsWindow::getSceneEditorSettings(%this)
|
||||||
|
|
||||||
SettingsInspector.startGroup("Misc");
|
SettingsInspector.startGroup("Misc");
|
||||||
//SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", "");
|
//SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", "");
|
||||||
SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", "");
|
SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterScalar", "Screen Center Scalar", "string", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterMax", "Screen Center Max", "string", "");
|
||||||
SettingsInspector.endGroup();
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
SettingsInspector.startGroup("Layout");
|
SettingsInspector.startGroup("Layout");
|
||||||
|
|
@ -444,6 +440,9 @@ function ESettingsWindow::getPostFXSettings(%this)
|
||||||
SettingsInspector.endGroup();
|
SettingsInspector.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::getObjectEditorSettings(%this)
|
||||||
|
{
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// COMMON GAME SETTINGS
|
// COMMON GAME SETTINGS
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,8 @@ function MeshRoadEditorPlugin::onWorldEditorStartup( %this )
|
||||||
// Add ourselves to the Editor Settings window
|
// Add ourselves to the Editor Settings window
|
||||||
exec( "./meshRoadEditorSettingsTab.gui" );
|
exec( "./meshRoadEditorSettingsTab.gui" );
|
||||||
//ESettingsWindow.addTabPage( EMeshRoadEditorSettingsPage );
|
//ESettingsWindow.addTabPage( EMeshRoadEditorSettingsPage );
|
||||||
|
|
||||||
|
ESettingsWindow.addEditorSettingsPage("MeshRoadEditor", "Mesh Road Editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
function MeshRoadEditorPlugin::onActivated( %this )
|
function MeshRoadEditorPlugin::onActivated( %this )
|
||||||
|
|
|
||||||
|
|
@ -211,6 +211,24 @@ function MeshRoadEditorGui::prepSelectionMode( %this )
|
||||||
ToolsPaletteArray-->MeshRoadEditorSelectMode.setStateOn(1);
|
ToolsPaletteArray-->MeshRoadEditorSelectMode.setStateOn(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
function ESettingsWindow::getMeshRoadEditorSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Defaults");
|
||||||
|
SettingsInspector.addSettingsField("MeshRoadEditor/DefaultWidth", "Width", "string", "");
|
||||||
|
SettingsInspector.addSettingsField("MeshRoadEditor/DefaultDepth", "Depth", "string", "");
|
||||||
|
SettingsInspector.addSettingsField("MeshRoadEditor/DefaultNormal", "Normal", "string", "");
|
||||||
|
|
||||||
|
SettingsInspector.addSettingsField("MeshRoadEditor/TopMaterialName", "Top Material", "string", "");
|
||||||
|
SettingsInspector.addSettingsField("MeshRoadEditor/BottomMaterialName", "Bottom Material", "string", "");
|
||||||
|
SettingsInspector.addSettingsField("MeshRoadEditor/SideMaterialName", "Side Material", "string", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
|
SettingsInspector.startGroup("Colors");
|
||||||
|
SettingsInspector.addSettingsField("MeshRoadEditor/HoverSplineColor", "Hover Spline", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("MeshRoadEditor/SelectedSplineColor", "Selected Spline", "colorI", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
function EMeshRoadEditorSelectModeBtn::onClick(%this)
|
function EMeshRoadEditorSelectModeBtn::onClick(%this)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,8 @@ function RiverEditorPlugin::onWorldEditorStartup( %this )
|
||||||
// Add ourselves to the Editor Settings window
|
// Add ourselves to the Editor Settings window
|
||||||
exec( "./RiverEditorSettingsTab.gui" );
|
exec( "./RiverEditorSettingsTab.gui" );
|
||||||
//ESettingsWindow.addTabPage( ERiverEditorSettingsPage );
|
//ESettingsWindow.addTabPage( ERiverEditorSettingsPage );
|
||||||
|
|
||||||
|
ESettingsWindow.addEditorSettingsPage("RiverEditor", "River Editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
function RiverEditorPlugin::onActivated( %this )
|
function RiverEditorPlugin::onActivated( %this )
|
||||||
|
|
|
||||||
|
|
@ -214,6 +214,20 @@ function RiverEditorGui::prepSelectionMode( %this )
|
||||||
ToolsPaletteArray-->RiverEditorSelectMode.setStateOn(1);
|
ToolsPaletteArray-->RiverEditorSelectMode.setStateOn(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
function ESettingsWindow::getRiverEditorSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Defaults");
|
||||||
|
SettingsInspector.addSettingsField("RiverEditor/DefaultWidth", "Width", "string", "");
|
||||||
|
SettingsInspector.addSettingsField("RiverEditor/DefaultDepth", "Depth", "string", "");
|
||||||
|
SettingsInspector.addSettingsField("RiverEditor/DefaultNormal", "Normal", "string", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
|
SettingsInspector.startGroup("Colors");
|
||||||
|
SettingsInspector.addSettingsField("RiverEditor/HoverSplineColor", "Hover Spline", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("RiverEditor/SelectedSplineColor", "Selected Spline", "colorI", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
function ERiverEditorSelectModeBtn::onClick(%this)
|
function ERiverEditorSelectModeBtn::onClick(%this)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,8 @@ function RoadEditorPlugin::onWorldEditorStartup( %this )
|
||||||
// Add ourselves to the Editor Settings window
|
// Add ourselves to the Editor Settings window
|
||||||
exec( "./RoadEditorSettingsTab.gui" );
|
exec( "./RoadEditorSettingsTab.gui" );
|
||||||
//ESettingsWindow.addTabPage( ERoadEditorSettingsPage );
|
//ESettingsWindow.addTabPage( ERoadEditorSettingsPage );
|
||||||
|
|
||||||
|
ESettingsWindow.addEditorSettingsPage("RoadEditor", "Road Editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
function RoadEditorPlugin::onActivated( %this )
|
function RoadEditorPlugin::onActivated( %this )
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,20 @@ function RoadEditorGui::prepSelectionMode( %this )
|
||||||
%this.setMode( "RoadEditorSelectMode" );
|
%this.setMode( "RoadEditorSelectMode" );
|
||||||
ToolsPaletteArray-->RoadEditorSelectMode.setStateOn(1);
|
ToolsPaletteArray-->RoadEditorSelectMode.setStateOn(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
function ESettingsWindow::getRoadEditorSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Defaults");
|
||||||
|
SettingsInspector.addSettingsField("RoadEditor/DefaultWidth", "Width", "string", "");
|
||||||
|
SettingsInspector.addSettingsField("RoadEditor/MaterialName", "Material", "string", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
|
SettingsInspector.startGroup("Colors");
|
||||||
|
SettingsInspector.addSettingsField("RoadEditor/HoverSplineColor", "Hover Spline", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("RoadEditor/SelectedSplineColor", "Selected Spline", "colorI", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
function ERoadEditorSelectModeBtn::onClick(%this)
|
function ERoadEditorSelectModeBtn::onClick(%this)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -156,8 +156,8 @@ function EditorGui::init(%this)
|
||||||
// Editor Settings Window
|
// Editor Settings Window
|
||||||
if( !isObject( %this-->EditorSettingsWindow ) )
|
if( !isObject( %this-->EditorSettingsWindow ) )
|
||||||
{
|
{
|
||||||
exec("tools/gui/EditorSettingsWindow.ed.gui");
|
|
||||||
exec("tools/gui/editorSettingsWindow.ed." @ $TorqueScriptFileExtension);
|
exec("tools/gui/editorSettingsWindow.ed." @ $TorqueScriptFileExtension);
|
||||||
|
exec("tools/gui/EditorSettingsWindow.ed.gui");
|
||||||
|
|
||||||
// Start the standard settings tabs pages
|
// Start the standard settings tabs pages
|
||||||
/*exec( "~/worldEditor/gui/GeneralSettingsTab.ed.gui" );
|
/*exec( "~/worldEditor/gui/GeneralSettingsTab.ed.gui" );
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ function TerrainEditor::init( %this )
|
||||||
%this.setBrushSize( 9, 9 );
|
%this.setBrushSize( 9, 9 );
|
||||||
|
|
||||||
new PersistenceManager( ETerrainPersistMan );
|
new PersistenceManager( ETerrainPersistMan );
|
||||||
|
|
||||||
|
ESettingsWindow.addEditorSettingsPage("TerrainEditor", "Terrain Editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|
@ -356,6 +358,18 @@ function TerrainEditor::onMaterialUndo( %this )
|
||||||
EPainter.updateLayers();
|
EPainter.updateLayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::getTerrainEditorSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Tool Values");
|
||||||
|
SettingsInspector.addSettingsField("TerrainEditor/ActionValues/adjustHeightVal", "Raise/Lower Height", "string",
|
||||||
|
"The amount of height adjustment for raising/lowering terrain");
|
||||||
|
SettingsInspector.addSettingsField("TerrainEditor/ActionValues/smoothFactor", "Smooth Factor", "string",
|
||||||
|
"The amount of smoothing when raising/lowering terrain");
|
||||||
|
SettingsInspector.addSettingsField("TerrainEditor/ActionValues/noiseFactor", "Noise Factor", "string",
|
||||||
|
"The amount of noise when raising/lowering terrain");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Functions
|
// Functions
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue