mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Separated ShapeAsset's fileName for the loose file name and the fully processed file path to avoid potential save-out problems
Fixed autoAssetImport so it properly cleared any prior import session objects Added beginning and ending comment line signfiers to make import logging easier to spot in console Fixed variable used when doing the actual import on assets where it would use the top-level asset import objects and not the children array, causing a crash Fixed the Make Selected A Mesh logic to work with the creation of a new shapeAsset Added secondary handling to generate a prefab of the original selection for preservation purposes Added optional input for makeSelectedPrefab to not delete the original selection(useful for the preservational prefab mentioned above) Adjusted font color for NA text edit fields to make it more legible Changed the non-working reloadDatabase button in assetBrowser to instead open the Asset Editing editor settings page.
This commit is contained in:
parent
2b686bf713
commit
813762c722
10 changed files with 106 additions and 50 deletions
|
|
@ -310,7 +310,7 @@
|
|||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "tools/gui/images/stencilIcons/return.png";
|
||||
iconBitmap = "tools/gui/images/stencilIcons/gear.png";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
|
|
@ -328,12 +328,12 @@
|
|||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "AssetBrowser.refreshDatabases();";
|
||||
command = "AssetBrowser.openAssetSettings();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Refresh Asset and Module databases.";
|
||||
tooltip = "Edit the editor settings for Assets.";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "refreshDatabasesButton";
|
||||
internalName = "editAssetSettingsButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1218,11 +1218,11 @@ function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId)
|
|||
//
|
||||
//
|
||||
//
|
||||
function AssetBrowser::refreshDatabases(%this)
|
||||
function AssetBrowser::openAssetSettings(%this)
|
||||
{
|
||||
//ModuleDatabase.scanModules( "data", false );
|
||||
//ModuleDatabase.unloadGroup( "Game" );
|
||||
//ModuleDatabase.LoadGroup( "Game" );
|
||||
ESettingsWindow.toggleEditorSettings();
|
||||
%assetEditIndex = ESettingsWindowList.findTextIndex("Asset Editing");
|
||||
ESettingsWindowList.setSelectedRow( %assetEditIndex );
|
||||
}
|
||||
|
||||
function AssetBrowser::showVisibiltyOptions(%this)
|
||||
|
|
|
|||
BIN
Templates/BaseGame/game/tools/gui/images/stencilIcons/gear.png
Normal file
BIN
Templates/BaseGame/game/tools/gui/images/stencilIcons/gear.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
|
|
@ -246,7 +246,7 @@
|
|||
<Setting name="dividerDarkColor">17 16 15 255</Setting>
|
||||
<Setting name="fieldBGColor">59 58 57 255</Setting>
|
||||
<Setting name="tabsHLColor">50 49 48 255</Setting>
|
||||
<Setting name="fieldTextNAColor">77 77 77 255</Setting>
|
||||
<Setting name="fieldTextNAColor">120 120 120 255</Setting>
|
||||
<Setting name="tooltipBGColor">43 43 43 255</Setting>
|
||||
<Setting name="tooltipDividerColor">72 70 68 255</Setting>
|
||||
<Setting name="fieldTextColor">178 175 172 255</Setting>
|
||||
|
|
|
|||
|
|
@ -573,10 +573,10 @@ function EditorExplodePrefab()
|
|||
EditorTree.buildVisibleTree( true );
|
||||
}
|
||||
|
||||
function makeSelectedAMesh()
|
||||
function makeSelectedAMesh(%assetId)
|
||||
{
|
||||
|
||||
%dlg = new SaveFileDialog()
|
||||
|
||||
/*%dlg = new SaveFileDialog()
|
||||
{
|
||||
Filters = "Collada file (*.dae)|*.dae|";
|
||||
DefaultPath = $Pref::WorldEditor::LastPath;
|
||||
|
|
@ -598,9 +598,45 @@ function makeSelectedAMesh()
|
|||
%dlg.delete();
|
||||
|
||||
if ( !%ret )
|
||||
return;
|
||||
return;*/
|
||||
|
||||
%assetDef = AssetDatabase.acquireAsset(%assetId);
|
||||
|
||||
EWorldEditor.makeSelectionAMesh( %saveFile );
|
||||
%assetPath = AssetDatabase.getAssetPath(%assetId);
|
||||
%filePath = %assetPath @ "/" @ %assetDef.AssetName @ ".dae";
|
||||
|
||||
%fileName = fileName(%filePath);
|
||||
|
||||
%assetDef.fileName = %fileName;
|
||||
%assetDef.saveAsset();
|
||||
|
||||
%success = EWorldEditor.makeSelectionAMesh( %filePath );
|
||||
|
||||
AssetDatabase.refreshAsset(%assetId);
|
||||
|
||||
if(%success)
|
||||
{
|
||||
//ok, cool it worked, so clear out the old
|
||||
//First, get our center of the currently selected objects
|
||||
%selectionCenter = EWorldEditor.getSelectionCentroid();
|
||||
|
||||
//Next, for safety purposes(and convenience!) we'll make them a prefab aping off the filepath/name provided
|
||||
//TODO: Make this an editor option
|
||||
%prefabPath = %assetPath @ "/" @ %assetDef.AssetName @ ".prefab";
|
||||
EWorldEditor.makeSelectionPrefab(%prefabPath, true);
|
||||
|
||||
//Next, nuke 'em
|
||||
EditorMenuEditDelete();
|
||||
|
||||
//now make a new static
|
||||
%newStatic = new TSStatic()
|
||||
{
|
||||
shapeAsset = %assetId;
|
||||
position = %selectionCenter;
|
||||
};
|
||||
|
||||
getRootScene().add(%newStatic);
|
||||
}
|
||||
|
||||
EditorTree.buildVisibleTree( true );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue