mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Improve handling of non-default script filenames
This commit is contained in:
parent
099dd4f1f3
commit
9ccaa6d3ea
118 changed files with 534 additions and 528 deletions
|
|
@ -206,7 +206,7 @@ function ForestEditorGui::newMesh( %this )
|
|||
ForestEditMeshTree.scrollVisible( %item );
|
||||
ForestEditMeshTree.addSelection( %item );
|
||||
|
||||
ForestDataManager.setDirty( %name, "art/forest/managedItemData.tscript" );
|
||||
ForestDataManager.setDirty( %name, "art/forest/managedItemData." @ $TorqueScriptFileExtension );
|
||||
|
||||
%element = new ForestBrushElement()
|
||||
{
|
||||
|
|
@ -255,7 +255,7 @@ function ForestEditorGui::deleteMesh( %this )
|
|||
function ForestEditorGui::okDeleteMesh( %this, %mesh )
|
||||
{
|
||||
// Remove mesh from file
|
||||
ForestDataManager.removeObjectFromFile( %mesh, "art/forest/managedItemData.tscript" );
|
||||
ForestDataManager.removeObjectFromFile( %mesh, "art/forest/managedItemData." @ $TorqueScriptFileExtension );
|
||||
|
||||
// Submitting undo actions is handled in code.
|
||||
%this.deleteMeshSafe( %mesh );
|
||||
|
|
@ -371,7 +371,7 @@ function ForestEditMeshTree::onDoubleClick( %this )
|
|||
parentGroup = ForestBrushGroup;
|
||||
};
|
||||
|
||||
//ForestDataManager.setDirty( %element, "art/forest/brushes.tscript" );
|
||||
//ForestDataManager.setDirty( %element, "art/forest/brushes." @ $TorqueScriptFileExtension );
|
||||
|
||||
ForestEditBrushTree.clearSelection();
|
||||
ForestEditBrushTree.buildVisibleTree( true );
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ function initializeForestEditor()
|
|||
{
|
||||
echo(" % - Initializing Forest Editor");
|
||||
|
||||
exec( "./forestEditor.tscript" );
|
||||
exec( "./forestEditor." @ $TorqueScriptFileExtension );
|
||||
exec( "./forestEditorGui.gui" );
|
||||
exec( "./forestEditToolbar.ed.gui" );
|
||||
|
||||
exec( "./forestEditorGui.tscript" );
|
||||
exec( "./tools.tscript" );
|
||||
exec( "./forestEditorGui." @ $TorqueScriptFileExtension );
|
||||
exec( "./tools." @ $TorqueScriptFileExtension );
|
||||
|
||||
ForestEditorGui.setVisible( false );
|
||||
ForestEditorPalleteWindow.setVisible( false );
|
||||
|
|
@ -84,16 +84,16 @@ function destroyForestEditor()
|
|||
// NOTE: debugging helper.
|
||||
function reinitForest()
|
||||
{
|
||||
exec( "./main.tscript" );
|
||||
exec( "./forestEditorGui.tscript" );
|
||||
exec( "./tools.tscript" );
|
||||
exec( "./main." @ $TorqueScriptFileExtension );
|
||||
exec( "./forestEditorGui." @ $TorqueScriptFileExtension );
|
||||
exec( "./tools." @ $TorqueScriptFileExtension );
|
||||
}
|
||||
|
||||
function ForestEditorPlugin::onWorldEditorStartup( %this )
|
||||
{
|
||||
new PersistenceManager( ForestDataManager );
|
||||
|
||||
%brushPath = "tools/forestEditor/brushes.tscript";
|
||||
%brushPath = "tools/forestEditor/brushes." @ $TorqueScriptFileExtension;
|
||||
|
||||
if ( !isFile( %brushPath ) )
|
||||
%successfulFile = createPath( %brushPath );
|
||||
|
|
@ -205,7 +205,7 @@ function ForestEditorPlugin::onActivated( %this )
|
|||
}
|
||||
|
||||
if ( %this.showError )
|
||||
toolsMessageBoxOK( "Error", "Your tools/forestEditor folder does not contain a valid brushes.tscript. Brushes you create will not be saved!" );
|
||||
toolsMessageBoxOK( "Error", "Your tools/forestEditor folder does not contain a valid brushes." @ $TorqueScriptFileExtension @ ". Brushes you create will not be saved!" );
|
||||
}
|
||||
|
||||
function ForestEditorPlugin::onDeactivated( %this )
|
||||
|
|
@ -262,7 +262,7 @@ function ForestEditorPlugin::onSaveMission( %this, %missionFile )
|
|||
}
|
||||
}
|
||||
|
||||
ForestBrushGroup.save( "tools/forestEditor/brushes.tscript" );
|
||||
ForestBrushGroup.save( "tools/forestEditor/brushes." @ $TorqueScriptFileExtension );
|
||||
}
|
||||
|
||||
function ForestEditorPlugin::onEditorSleep( %this )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue