Added ImageAsset type mode for cubemaps.

Added new inspector type TypeShapeAssetId which is processed as a assetId string instead of an AssetPtr.
Added utility function to ShapeAsset to getAssetIdByFilename, which lets you find - if any exist - the asset that utilizes a given loose file. If it doesn't find one, it can attempt to run an auto-import if the editor settings allow, then proceed.
Fixed callback of the shapeAsset inspector fields so the Open in Shape Editor correctly binds the asset's shape to the editor for modification.
Added function to open a shapeAssetId in the shape editor to facilitate the above.
Added additional check to findShapeConstructor to look up the full path of the shape in the cases where a full path is provided instead of a local path. This prevents the shapeConstructor from not finding shapes that absolutely exist.
Added beginnings of Datablock representation in Asset Browser.
Fixed a few minor issues with asset auto import causing false positive errors, preventing Import or erroneous logging.
Fixed issue where editing of asset import configs didn't save.
Fixed logic of materials in asset browser so they will open in the material editor as expected.
Re-enabled AutoImport of assets editor setting by default.
This commit is contained in:
Areloch 2020-04-15 12:15:12 -05:00
parent 72b489fe25
commit 157b114ec7
15 changed files with 1057 additions and 686 deletions

View file

@ -101,6 +101,7 @@ function initializeAssetBrowser()
exec("./scripts/assetTypes/folder.cs");
exec("./scripts/assetTypes/terrain.cs");
exec("./scripts/assetTypes/terrainMaterial.cs");
exec("./scripts/assetTypes/datablockObjects.cs");
new ScriptObject( AssetBrowserPlugin )
{

View file

@ -278,7 +278,45 @@ function AssetBrowser::buildAssetPreview( %this, %asset, %moduleName )
}
else
{
%fullPath = %moduleName !$= "" ? %moduleName @ "/" @ %asset : %asset;
//special-case entry
if(getFieldCount(%asset) > 1)
{
%specialType = getField(%asset,0);
/*if(%specialType $= "Folder")
{
}
else if(%specialType $= "Datablock")
{
%sdfasdgah = true;
}*/
%assetType = %specialType;
%assetName = getField(%asset, 1);
%sdfasdgah = true;
if(%assetType $= "Folder")
{
%fullPath = %moduleName !$= "" ? %moduleName @ "/" @ %assetName : %assetName;
%fullPath = strreplace(%fullPath, "/", "_");
if(isObject(%fullPath))
%assetDesc = %fullPath;
else
%assetDesc = new ScriptObject(%fullPath);
%assetDesc.dirPath = %moduleName;
%assetDesc.assetName = %assetName;
%assetDesc.description = %moduleName @ "/" @ %assetName;
%assetDesc.assetType = %assetType;
}
else if(%assetType $= "Datablock")
{
%assetDesc = %assetName;
%assetDesc.assetType = %assetType;
}
}
/*%fullPath = %moduleName !$= "" ? %moduleName @ "/" @ %assetName : %assetName;
%fullPath = strreplace(%fullPath, "/", "_");
if(isObject(%fullPath))
@ -287,12 +325,12 @@ function AssetBrowser::buildAssetPreview( %this, %asset, %moduleName )
%assetDesc = new ScriptObject(%fullPath);
%assetDesc.dirPath = %moduleName;
%assetDesc.assetName = %asset;
%assetDesc.description = %moduleName @ "/" @ %asset;
%assetDesc.assetType = "Folder";
%assetDesc.assetName = %assetName;
%assetDesc.description = %moduleName @ "/" @ %assetName;
%assetDesc.assetType = %assetType;*/
%assetName = %asset;
%assetType = "Folder";
//%assetName = %asset;
//%assetType = "Folder";
}
%previewSize = %this.previewSize SPC %this.previewSize;
@ -425,7 +463,7 @@ function AssetBrowser::loadDirectories( %this )
}
//Add Non-Asset Scripted Objects. Datablock, etc based
%category = getWord( %breadcrumbPath, 1 );
/*%category = getWord( %breadcrumbPath, 1 );
%dataGroup = "DataBlockGroup";
if(%dataGroup.getCount() != 0)
@ -437,8 +475,14 @@ function AssetBrowser::loadDirectories( %this )
%obj = %dataGroup.getObject(%i);
// echo ("Obj: " @ %obj.getName() @ " - " @ %obj.category );
if ( %obj.category $= "" && %obj.category == 0 )
continue;
//if ( %obj.category $= "" && %obj.category == 0 )
// continue;
%dbFilename = %obj.getFileName();
%dbFilePath = filePath(%dbFilename);
if(%breadcrumbPath $= %dbFilePath)
{
//if ( %breadcrumbPath $= "" )
//{
@ -456,8 +500,9 @@ function AssetBrowser::loadDirectories( %this )
{
AssetBrowser-->filterTree.insertItem(%scriptedItem, %obj.getName());
}*/
}
}
//}
//}
// }
AssetPreviewArray.empty();
@ -916,6 +961,9 @@ function AssetBrowser::doRebuildAssetArray(%this)
AssetBrowser-->assetList.deleteAllObjects();
AssetPreviewArray.empty();
if(isObject(%assetArray))
%assetArray.delete();
%assetArray = new ArrayObject();
//First, Query for our assets
@ -1032,12 +1080,12 @@ function AssetBrowser::doRebuildAssetArray(%this)
if(%searchText !$= "Search Assets...")
{
if(strstr(strlwr(%folderName), strlwr(%searchText)) != -1)
%assetArray.add( %breadcrumbPath, %folderName );
%assetArray.add( %breadcrumbPath, "Folder" TAB %folderName );
}
else
{
//got it.
%assetArray.add( %breadcrumbPath, %folderName );
%assetArray.add( %breadcrumbPath, "Folder" TAB %folderName );
}
}
}
@ -1046,32 +1094,36 @@ function AssetBrowser::doRebuildAssetArray(%this)
%category = getWord( %breadcrumbPath, 1 );
%dataGroup = "DataBlockGroup";
if(%dataGroup.getCount() != 0)
for ( %i = 0; %i < %dataGroup.getCount(); %i++ )
{
%scriptedItem = AssetBrowser-->filterTree.findItemByName("Scripted");
%obj = %dataGroup.getObject(%i);
// echo ("Obj: " @ %obj.getName() @ " - " @ %obj.category );
for ( %i = 0; %i < %dataGroup.getCount(); %i++ )
//if ( %obj.category $= "" && %obj.category == 0 )
// continue;
%dbFilename = %obj.getFileName();
%dbFilePath = filePath(%dbFilename);
if(%breadcrumbPath $= %dbFilePath)
{
%obj = %dataGroup.getObject(%i);
// echo ("Obj: " @ %obj.getName() @ " - " @ %obj.category );
%dbName = %obj.getName();
%assetArray.add( %breadcrumbPath, "Datablock" TAB %dbName );
if ( %obj.category $= "" && %obj.category == 0 )
continue;
/*%catItem = AssetBrowser-->filterTree.findItemByName(%obj.category);
/*if ( %breadcrumbPath $= "" )
{
%ctrl = %this.findIconCtrl( %obj.category );
if ( %ctrl == -1 )
{
%this.addFolderIcon( %obj.category );
}
}
else */
if ( %breadcrumbPath $= %obj.category )
{
AssetBrowser-->filterTree.insertItem(%scriptedItem, %obj.getName());
}
if(%catItem == 0)
AssetBrowser-->filterTree.insertItem(%scriptedItem, %obj.category, "scripted");*/
/*%ctrl = %this.findIconCtrl( %obj.category );
if ( %ctrl == -1 )
{
%this.addFolderIcon( %obj.category );
}*/
}
/*else if ( %breadcrumbPath $= %obj.category )
{
AssetBrowser-->filterTree.insertItem(%scriptedItem, %obj.getName());
}*/
}
AssetBrowser.currentPreviewPage = 0;

View file

@ -464,11 +464,15 @@ function importLooseFile(%filePath, %forceAutoImport)
%assetItem.moduleName = %targetModule;
%assetName = %assetItem.assetName;
AssetBrowser.dirHandler.currentAddress = filePath(%filePath);
//skip the refresh delay, we'll force it here
ImportAssetWindow.doRefresh();
ImportAssetItems.empty();
if(ImportAssetWindow.hasImportIssues)
return false;
}
@ -673,7 +677,8 @@ function ImportAssetWindow::doRefresh(%this)
%ImportActionSummary = %ImportActionSummary SPC %this.autoRenamedAssets @ " Auto Renamed|";
}
warn(%ImportActionSummary);
if(%ImportActionSummary !$= "")
warn(%ImportActionSummary);
AssetImportSummarization.Text = %ImportActionSummary;
@ -1222,7 +1227,7 @@ function ImportAssetWindow::checkAssetsForCollision(%this, %assetItemToCheck, %a
}
}
return result;
return %result;
}
//

View file

@ -23,6 +23,11 @@ function AssetImportConfigEditor::refresh(%this)
ImportAssetConfigList.setSelected(0);
}
function AssetImportConfigEditor::apply(%this)
{
AssetImportSettings.write();
}
function AssetImportConfigList::onSelect( %this, %id, %text )
{
ImportOptionsConfigList.clearFields();

View file

@ -0,0 +1,127 @@
function AssetBrowser::createNewDatablock(%this)
{
AssetBrowser_newFolderNameTxt.text = "NewFolder";
Canvas.pushDialog(AssetBrowser_newFolder);
}
function AssetBrowser::doCreateNewDatablock(%this)
{
%newFolderName = AssetBrowser_newFolderNameTxt.getText();
if(%newFolderName $= "")
%newFolderName = "NewFolder";
%newFolderIdx = "";
%matched = true;
%newFolderPath = "";
while(%matched == true)
{
%newFolderPath = AssetBrowser.dirHandler.currentAddress @ "/" @ %newFolderName @ %newFolderIdx;
if(!isDirectory(%newFolderPath))
{
%matched = false;
}
else
{
%newFolderIdx++;
}
}
//make a dummy file
%file = new FileObject();
%file.openForWrite(%newFolderPath @ "/test");
%file.close();
fileDelete(%newFolderPath @ "/test");
//refresh the directory
AssetBrowser.loadDirectories();
%this.navigateTo(%newFolderPath);
}
function AssetBrowser::buildDatablockPreview(%this, %assetDef, %previewData)
{
%previewData.assetName = %assetDef.assetName;
%previewData.assetPath = %assetDef.dirPath;
%previewData.previewImage = "tools/assetBrowser/art/scriptIcon";
//%previewData.assetFriendlyName = %assetDef.assetName;
%previewData.assetDesc = %assetDef.description;
%previewData.tooltip = %assetDef.dirPath;
%previewData.doubleClickCommand = "AssetBrowser.schedule(10, \"navigateTo\",\""@ %assetDef.dirPath @ "/" @ %assetDef.assetName @"\");";//browseTo %assetDef.dirPath / %assetDef.assetName
}
function AssetBrowser::renameDatablock(%this, %folderPath, %newFolderName)
{
%fullPath = makeFullPath(%folderPath);
%newFullPath = makeFullPath(%folderPath);
%fullPath = strreplace(%fullPath, "//", "/");
%count = getTokenCount(%fullPath, "/");
%basePath = getTokens(%fullPath, "/", 0, %count-2);
%oldName = getToken(%fullPath, "/", %count-1);
//We need to ensure that no files are 'active' while we try and clean up behind ourselves with the delete action
//so, we nix any assets active for the module, do the delete action on the old folder, and then re-acquire our assets.
//This will have the added benefit of updating paths for asset items
%module = AssetBrowser.dirHandler.getModuleFromAddress(AssetBrowser.dirHandler.currentAddress);
%moduleId = %module.ModuleId;
AssetDatabase.removeDeclaredAssets(%moduleId);
%copiedSuccess = %this.dirHandler.copyDatablock(%fullPath, %basePath @ "/" @ %newFolderName);
%this.dirHandler.deleteDatablock(%fullPath);
%this.loadDirectories();
AssetDatabase.addModuleDeclaredAssets(%moduleId);
}
function AssetBrowser::moveDatablock(%this, %folderPath, %newFolderPath)
{
%fullPath = makeFullPath(%folderPath);
%newFullPath = makeFullPath(%newFolderPath);
%fullPath = strreplace(%fullPath, "//", "/");
%newFullPath = strreplace(%newFullPath, "//", "/");
%count = getTokenCount(%fullPath, "/");
%basePath = getTokens(%fullPath, "/", 0, %count-2);
%oldName = getToken(%fullPath, "/", %count-1);
%copiedSuccess = %this.dirHandler.copyDatablock(%fullPath, %newFullPath);
%this.dirHandler.deleteDatablock(%fullPath);
%this.loadDirectories();
//thrash the modules and reload them
%oldModule = %this.dirHandler.getModuleFromAddress(%folderPath);
%newModule = %this.dirHandler.getModuleFromAddress(%newFolderPath);
//if we didn't move modules, then we don't need to do anything other than refresh the assets within it
if(%oldModule == %newModule)
{
//only do a refresh to update asset loose file paths
AssetDatabase.refreshAllAssets();
}
else
{
//they're different moduels now, so we gotta unload/reload both
ModuleDatabase.unloadExplicit(%oldModule.getModuleId());
ModuleDatabase.loadExplicit(%oldModule.getModuleId());
ModuleDatabase.unloadExplicit(%newModule.getModuleId());
ModuleDatabase.loadExplicit(%newModule.getModuleId());
}
}
function AssetBrowser::deleteDatablock(%this, %folderPath)
{
%this.dirHandler.deleteDatablock(%folderPath);
%this.refresh();
}

View file

@ -43,6 +43,18 @@ function AssetBrowser::editMaterialAsset(%this, %assetDef)
MaterialEditorGui.setActiveMaterial( %assetDef.materialDefinitionName );
AssetBrowser.hideDialog();
//
//
/*%assetDef.materialDefinitionName.reload();
$Tools::materialEditorList = "";
EWorldEditor.clearSelection();
MaterialEditorGui.currentObject = 0;
MaterialEditorGui.currentMode = "asset";
MaterialEditorGui.currentMaterial = %assetDef.materialDefinitionName;
MaterialEditorGui.setActiveMaterial( %assetDef.materialDefinitionName);
EditorGui.setEditor(MaterialEditorPlugin);
AssetBrowser.hideDialog();*/
}
//Renames the asset
@ -424,7 +436,7 @@ function AssetBrowser::buildMaterialAssetPreview(%this, %assetDef, %previewData)
%previewData.assetPath = %assetDef.scriptFile;
//Lotta prepwork
%previewData.doubleClickCommand = %assetDef@".materialDefinitionName.reload(); "
/*%previewData.doubleClickCommand = %assetDef@".materialDefinitionName.reload(); "
@ "$Tools::materialEditorList = \"\";"
@ "EWorldEditor.clearSelection();"
@ "MaterialEditorGui.currentObject = 0;"
@ -432,7 +444,9 @@ function AssetBrowser::buildMaterialAssetPreview(%this, %assetDef, %previewData)
@ "MaterialEditorGui.currentMaterial = "@%assetDef@".materialDefinitionName;"
@ "MaterialEditorGui.setActiveMaterial( "@%assetDef@".materialDefinitionName );"
@ "EditorGui.setEditor(MaterialEditorPlugin); "
@ "AssetBrowser.hideDialog();";
@ "AssetBrowser.hideDialog();";*/
%previewData.doubleClickCommand = "AssetBrowser.editAsset(" @ %assetDef @ ");";
%test = %assetDef.materialDefinitionName.diffuseMapAsset[0];

View file

@ -1,218 +1,205 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<EditorSettings>
<Group name="Theme">
<Setting name="tabsHLColor">50 49 48 255</Setting>
<Setting name="tooltipTextColor">255 255 255 255</Setting>
<Setting name="dividerMidColor">50 49 48 255</Setting>
<Setting name="tooltipDividerColor">72 70 68 255</Setting>
<Setting name="fieldBGColor">59 58 57 255</Setting>
<Setting name="tabsColor">37 36 35 255</Setting>
<Setting name="fieldTextHLColor">234 232 230 255</Setting>
<Setting name="dividerDarkColor">17 16 15 255</Setting>
<Setting name="dividerLightColor">96 94 92 255</Setting>
<Setting name="headerColor">50 49 48 255</Setting>
<Setting name="windowBackgroundColor">32 31 30 255</Setting>
<Setting name="tabsSELColor">59 58 57 255</Setting>
<Setting name="headerTextColor">236 234 232 255</Setting>
<Setting name="fieldTextNAColor">77 77 77 255</Setting>
<Setting name="fieldBGSELColor">100 98 96 255</Setting>
<Setting name="fieldTextColor">178 175 172 255</Setting>
<Setting name="fieldTextSELColor">255 255 255 255</Setting>
<Setting name="tooltipBGColor">43 43 43 255</Setting>
<Setting name="fieldBGHLColor">72 70 68 255</Setting>
<Group name="RiverEditor">
<Setting name="DefaultNormal">0 0 1</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
<Setting name="DefaultDepth">5</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="DefaultWidth">10</Setting>
</Group>
<Group name="GuiEditor">
<Setting name="lastPath">tools/RPGDialogEditor/gui</Setting>
<Setting name="previewResolution">1024 768</Setting>
<Group name="Rendering">
<Setting name="drawGuides">1</Setting>
<Setting name="drawBorderLines">1</Setting>
</Group>
<Group name="Snapping">
<Setting name="sensitivity">2</Setting>
<Setting name="snapToControls">1</Setting>
<Setting name="snapToEdges">1</Setting>
<Setting name="snap2Grid">0</Setting>
<Setting name="snap2GridSize">8</Setting>
<Setting name="snapToGuides">1</Setting>
<Setting name="snapToCanvas">1</Setting>
<Setting name="snapToCenters">1</Setting>
</Group>
<Group name="Help">
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="snapToCanvas">1</Setting>
<Setting name="snapToControls">1</Setting>
<Setting name="sensitivity">2</Setting>
<Setting name="snapToEdges">1</Setting>
<Setting name="snap2GridSize">8</Setting>
<Setting name="snap2Grid">0</Setting>
</Group>
<Group name="Library">
<Setting name="viewType">Categorized</Setting>
</Group>
<Group name="EngineDevelopment">
<Setting name="toggleIntoEditor">0</Setting>
<Setting name="showEditorGuis">0</Setting>
<Setting name="showEditorProfiles">0</Setting>
</Group>
<Group name="Help">
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
</Group>
<Group name="Rendering">
<Setting name="drawBorderLines">1</Setting>
<Setting name="drawGuides">1</Setting>
</Group>
<Group name="Selection">
<Setting name="fullBox">0</Setting>
</Group>
<Group name="EngineDevelopment">
<Setting name="showEditorGuis">0</Setting>
<Setting name="showEditorProfiles">0</Setting>
<Setting name="toggleIntoEditor">0</Setting>
</Group>
</Group>
<Group name="WorldEditor">
<Setting name="recentLevelsList">FPSGameplay:EmptyLevel,pbr:PbrMatTestLevel,FPSGameplay:EmptyTerrain,TTR:DasBootLevel</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Setting name="displayType">6</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="dropType">screenCenter</Setting>
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
<Setting name="lastEditedLevel">FPSGameplay:EmptyLevel</Setting>
<Setting name="forceSidebarToSide">1</Setting>
<Setting name="startupMode">Blank Level</Setting>
<Setting name="forceLoadDAE">0</Setting>
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
<Setting name="recentLevelsList">FPSGameplay:EmptyLevel,pbr:PbrMatTestLevel,FPSGameplay:EmptyTerrain,TTR:DasBootLevel</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
<Setting name="EditorLayoutMode">Modern</Setting>
<Setting name="undoLimit">40</Setting>
<Setting name="forceLoadDAE">0</Setting>
<Group name="ObjectIcons">
<Setting name="fadeIconsStartDist">8</Setting>
<Setting name="fadeIconsEndDist">20</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
<Setting name="fadeIconsStartAlpha">255</Setting>
<Setting name="fadeIcons">1</Setting>
</Group>
<Group name="Docs">
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
</Group>
<Group name="Color">
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
<Setting name="selectionBoxColor">255 255 0 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
</Group>
<Group name="Images">
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
</Group>
<Group name="Grid">
<Setting name="gridSnap">1</Setting>
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridSize">1</Setting>
<Setting name="gridMinorColor">51 51 51 100</Setting>
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="dropType">screenCenter</Setting>
<Setting name="displayType">6</Setting>
<Setting name="forceSidebarToSide">1</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Group name="Theme">
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
</Group>
<Group name="Tools">
<Setting name="dropAtScreenCenterScalar">1</Setting>
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="snapSoft">0</Setting>
<Setting name="dropAtScreenCenterMax">100</Setting>
<Setting name="snapSoft">0</Setting>
<Setting name="OffsetZValue">0.01</Setting>
<Setting name="dropAtScreenCenterScalar">1</Setting>
<Setting name="TerrainSnapOffsetZ">0</Setting>
<Setting name="snapGround">0</Setting>
<Setting name="objectsUseBoxCenter">1</Setting>
<Setting name="snapSoftSize">2</Setting>
<Setting name="OffsetZValue">0.01</Setting>
</Group>
<Group name="Theme">
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
<Setting name="boundingBoxCollision">0</Setting>
</Group>
<Group name="Render">
<Setting name="renderSelectionBox">1</Setting>
<Setting name="showMousePopupInfo">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
<Setting name="renderObjText">1</Setting>
<Setting name="renderObjHandle">1</Setting>
<Setting name="showMousePopupInfo">1</Setting>
<Setting name="renderObjText">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
</Group>
<Group name="Images">
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
</Group>
<Group name="ObjectIcons">
<Setting name="fadeIcons">1</Setting>
<Setting name="fadeIconsStartDist">8</Setting>
<Setting name="fadeIconsEndDist">20</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
<Setting name="fadeIconsStartAlpha">255</Setting>
</Group>
<Group name="Color">
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="selectionBoxColor">255 255 0 255</Setting>
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
</Group>
<Group name="Grid">
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridSize">1</Setting>
<Setting name="gridMinorColor">51 51 51 100</Setting>
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="gridSnap">1</Setting>
</Group>
<Group name="Docs">
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
</Group>
<Group name="Layout">
<Setting name="LayoutMode">Classic</Setting>
</Group>
</Group>
<Group name="ShapeEditor">
<Setting name="renderMounts">1</Setting>
<Setting name="SunDiffuseColor">255 255 255 255</Setting>
<Setting name="SunAngleX">45</Setting>
<Setting name="RenderCollision">0</Setting>
<Setting name="backgroundColor">0 0 0 100</Setting>
<Setting name="highlightMaterial">1</Setting>
<Setting name="AdvancedWndVisible">1</Setting>
<Setting name="showBounds">0</Setting>
<Setting name="SunAngleZ">135</Setting>
<Setting name="showObjBox">1</Setting>
<Setting name="gridSize">0.1</Setting>
<Setting name="showNodes">1</Setting>
<Setting name="SunAmbientColor">180 180 180 255</Setting>
<Setting name="gridDimension">40 40</Setting>
<Setting name="ShowGrid">1</Setting>
</Group>
<Group name="AxisGizmo">
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="rotationSnap">15</Setting>
<Setting name="mouseScaleScalar">0.8</Setting>
<Setting name="renderWhenUsed">0</Setting>
<Setting name="renderInfoText">1</Setting>
<Setting name="snapRotations">0</Setting>
<Setting name="mouseRotateScalar">0.8</Setting>
<Setting name="renderWhenUsed">0</Setting>
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="renderInfoText">1</Setting>
<Setting name="rotationSnap">15</Setting>
<Setting name="snapRotations">0</Setting>
<Group name="Grid">
<Setting name="renderPlane">0</Setting>
<Setting name="renderPlaneHashes">0</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="snapToGrid">1</Setting>
<Setting name="forceSnapRotations">1</Setting>
<Setting name="planeDim">500</Setting>
<Setting name="forceSnapRotations">1</Setting>
<Setting name="renderPlaneHashes">0</Setting>
<Setting name="gridSize">1 1 1</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="renderPlane">0</Setting>
<Setting name="snapToGrid">1</Setting>
</Group>
</Group>
<Group name="RiverEditor">
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="DefaultDepth">5</Setting>
<Group name="AssetBrowser">
<Setting name="previewSize">Small</Setting>
</Group>
<Group name="MeshRoadEditor">
<Setting name="DefaultNormal">0 0 1</Setting>
<Setting name="DefaultWidth">10</Setting>
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="sideMaterialName">DefaultRoadMaterialOther</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
</Group>
<Group name="DatablockEditor">
<Setting name="libraryTab">1</Setting>
</Group>
<Group name="ShapeEditor">
<Setting name="showObjBox">1</Setting>
<Setting name="showNodes">1</Setting>
<Setting name="gridSize">0.1</Setting>
<Setting name="SunAngleZ">135</Setting>
<Setting name="SunAmbientColor">180 180 180 255</Setting>
<Setting name="SunAngleX">45</Setting>
<Setting name="ShowGrid">1</Setting>
<Setting name="gridDimension">40 40</Setting>
<Setting name="AdvancedWndVisible">1</Setting>
<Setting name="renderMounts">1</Setting>
<Setting name="showBounds">0</Setting>
<Setting name="SunDiffuseColor">255 255 255 255</Setting>
<Setting name="RenderCollision">0</Setting>
<Setting name="highlightMaterial">1</Setting>
<Setting name="backgroundColor">0 0 0 100</Setting>
</Group>
<Group name="AssetCreation">
<Setting name="TerrainAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="PostFXAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="AutoImport">1</Setting>
<Setting name="ScriptAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;SpecialAssetTag&gt;/</Setting>
<Setting name="CubemapAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="GUIAssetSubdirectoryFormat">&lt;AssetType&gt;/OtherFolder/</Setting>
<Setting name="AssetImporDefaultConfig">TestConfig</Setting>
<Setting name="LevelAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;AssetName&gt;/</Setting>
<Setting name="CppAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;SpecialAssetTag&gt;/</Setting>
<Setting name="TerrainMatAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="StatemachineAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="topMaterialName">DefaultRoadMaterialTop</Setting>
</Group>
<Group name="TerrainEditor">
<Setting name="currentAction">lowerHeight</Setting>
<Group name="Brush">
<Setting name="brushPressure">1</Setting>
<Setting name="brushType">ellipse</Setting>
<Setting name="brushSoftness">1</Setting>
<Setting name="brushSize">40 40</Setting>
<Setting name="maxBrushSize">40 40</Setting>
<Setting name="brushType">ellipse</Setting>
<Setting name="brushPressure">1</Setting>
<Setting name="brushSoftness">1</Setting>
</Group>
<Group name="ActionValues">
<Setting name="smoothFactor">0.1</Setting>
<Setting name="SlopeMinAngle">0</Setting>
<Setting name="setHeightVal">100</Setting>
<Setting name="softSelectDefaultFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="SlopeMinAngle">0</Setting>
<Setting name="softSelectFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="softSelectRadius">50</Setting>
<Setting name="scaleVal">1</Setting>
<Setting name="adjustHeightVal">10</Setting>
<Setting name="SlopeMaxAngle">90</Setting>
<Setting name="noiseFactor">1</Setting>
<Setting name="SlopeMaxAngle">90</Setting>
<Setting name="softSelectRadius">50</Setting>
<Setting name="adjustHeightVal">10</Setting>
<Setting name="softSelectFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="scaleVal">1</Setting>
<Setting name="smoothFactor">0.1</Setting>
</Group>
</Group>
<Group name="AssetCreation">
<Setting name="CubemapAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="StatemachineAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="AutoImport">1</Setting>
<Setting name="AssetImporDefaultConfig">TestConfig</Setting>
<Setting name="LevelAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;AssetName&gt;/</Setting>
<Setting name="CppAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;SpecialAssetTag&gt;/</Setting>
<Setting name="PostFXAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="ScriptAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;SpecialAssetTag&gt;/</Setting>
<Setting name="TerrainAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="GUIAssetSubdirectoryFormat">&lt;AssetType&gt;/OtherFolder/</Setting>
<Setting name="TerrainMatAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
</Group>
<Group name="LevelInformation">
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
<Group name="levels">
@ -230,36 +217,49 @@
</Group>
</Group>
</Group>
<Group name="MeshRoadEditor">
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="topMaterialName">DefaultRoadMaterialTop</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="DefaultWidth">10</Setting>
<Setting name="DefaultNormal">0 0 1</Setting>
<Setting name="sideMaterialName">DefaultRoadMaterialOther</Setting>
</Group>
<Group name="RoadEditor">
<Setting name="materialName">DefaultDecalRoadMaterial</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
<Setting name="DefaultWidth">10</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
</Group>
<Group name="NavEditor">
<Setting name="SpawnClass">AIPlayer</Setting>
<Setting name="backgroundBuild">1</Setting>
<Setting name="spawnDatablock">DefaultPlayerData</Setting>
</Group>
<Group name="ConvexEditor">
<Setting name="materialName">Grid_512_Orange</Setting>
</Group>
<Group name="Assets">
<Setting name="AutoImport">0</Setting>
<Setting name="AssetImporDefaultConfig">TestConfig</Setting>
<Setting name="AutoImport">1</Setting>
<Group name="Browser">
<Setting name="previewTileSize">small</Setting>
</Group>
</Group>
<Group name="AssetBrowser">
<Setting name="previewSize">Small</Setting>
<Group name="NavEditor">
<Setting name="backgroundBuild">1</Setting>
<Setting name="spawnDatablock">DefaultPlayerData</Setting>
<Setting name="SpawnClass">AIPlayer</Setting>
</Group>
<Group name="RoadEditor">
<Setting name="HoverNodeColor">255 255 255 255</Setting>
<Setting name="materialName">DefaultDecalRoadMaterial</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="DefaultWidth">10</Setting>
</Group>
<Group name="Theme">
<Setting name="dividerLightColor">96 94 92 255</Setting>
<Setting name="fieldBGSELColor">100 98 96 255</Setting>
<Setting name="fieldTextHLColor">234 232 230 255</Setting>
<Setting name="tabsSELColor">59 58 57 255</Setting>
<Setting name="dividerMidColor">50 49 48 255</Setting>
<Setting name="headerColor">50 49 48 255</Setting>
<Setting name="windowBackgroundColor">32 31 30 255</Setting>
<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="tooltipBGColor">43 43 43 255</Setting>
<Setting name="tooltipDividerColor">72 70 68 255</Setting>
<Setting name="fieldTextColor">178 175 172 255</Setting>
<Setting name="fieldBGHLColor">72 70 68 255</Setting>
<Setting name="tabsColor">37 36 35 255</Setting>
<Setting name="headerTextColor">236 234 232 255</Setting>
<Setting name="tooltipTextColor">255 255 255 255</Setting>
<Setting name="fieldTextSELColor">255 255 255 255</Setting>
</Group>
<Group name="DatablockEditor">
<Setting name="libraryTab">1</Setting>
</Group>
<Group name="ConvexEditor">
<Setting name="materialName">Grid_512_Orange</Setting>
</Group>
</EditorSettings>

View file

@ -151,6 +151,13 @@ function ShapeEditorPlugin::openShapeAsset(%this, %assetDef)
%this.open(%this.selectedAssetDef.fileName);
}
function ShapeEditorPlugin::openShapeAssetId(%this, %assetId)
{
%this.selectedAssetDef = AssetDatabase.acquireAsset(%assetId);
//%this.selectedAssetDef = %assetDef;
%this.open(%this.selectedAssetDef.fileName);
}
function ShapeEditorPlugin::open(%this, %filename)
{
if ( !%this.isActivated )