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
This commit is contained in:
Areloch 2020-02-04 01:47:28 -06:00
parent 9735b1180d
commit f7b891442a
92 changed files with 1735 additions and 536 deletions

View file

@ -355,7 +355,7 @@ function VerveEditorGroupBuilderFieldStack::CreateObjectList( %this, %objectType
%listObject.add( "", 0 );
// Populate List.
%listObject.CheckGroup( MissionGroup, %objectType );
%listObject.CheckGroup( getRootScene(), %objectType );
// Sort the List.
%listObject.sort();

View file

@ -106,7 +106,6 @@
visible = "1";
active = "1";
command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );";
altCommand = "AssetBrowser.editAsset( 20540 );";
tooltipProfile = "GuiToolTipProfile";
tooltip = "\n20540";
hovertime = "1000";
@ -227,7 +226,6 @@
visible = "1";
active = "1";
command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );";
altCommand = "20550.materialDefinitionName.reload(); $Tools::materialEditorList = \"\";EWorldEditor.clearSelection();MaterialEditorGui.currentObject = 0;MaterialEditorGui.currentMode = \"asset\";MaterialEditorGui.currentMaterial = 20550.materialDefinitionName;MaterialEditorGui.setActiveMaterial( 20550.materialDefinitionName );EditorGui.setEditor(MaterialEditorPlugin); AssetBrowser.hideDialog();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "\n20550";
hovertime = "1000";

View file

@ -19,13 +19,6 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
if( !isObject( ToolsGuiDefaultNonModalProfile ) )
new GuiControlProfile (ToolsGuiDefaultNonModalProfile : ToolsGuiDefaultProfile)
{
opaque = false;
modal = false;
};
function initializeAssetBrowser()
{
echo(" % - Initializing Asset Browser");
@ -147,4 +140,12 @@ function AssetBrowserPlugin::onWorldEditorStartup( %this )
{
// Add ourselves to the toolbar.
AssetBrowser.addToolbarButton();
}
function TSStatic::onConstructField(%this, %fieldName, %fieldLabel, %fieldTypeName, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
{
%inspector = %this.getParent();
%makeCommand = %this @ ".build" @ %fieldTypeName @ "Field(\""@ %fieldName @ "\",\"" @ %fieldLabel @ "\",\"" @ %fieldDesc @ "\",\"" @
%fieldDefaultVal @ "\",\"" @ %fieldDataVals @ "\",\"" @ %inspector @ "." @ %callbackName @ "\",\"" @ %ownerObj @"\");";
eval(%makeCommand);
}

View file

@ -68,7 +68,7 @@ function AssetBrowser::onWake(%this)
%moduleName = getWord(%modulesList, %i).ModuleId;
%moduleGroup = getWord(%modulesList, %i).Group;
if((%moduleGroup $= "Core" || %moduleGroup $= "Tools") && !%this.coreModulesFilter)
if((%moduleGroup $= "Core" && !%this.coreModulesFilter) || (%moduleGroup $= "Tools" && !%this.toolsModulesFilter))
continue;
%nonDefaultModuleCount++;
@ -82,6 +82,8 @@ function AssetBrowser::onWake(%this)
}
%this.setPreviewSize(EditorSettings.value("Assets/Browser/previewTileSize", "small"));
AssetBrowser.toggleAssetTypeFilter(0);
}
//Filters
@ -95,11 +97,13 @@ function AssetBrowser::viewCoreModulesFilter(%this)
%oldVal = EditorSettings.value("Assets/Browser/showCoreModule", false);
%newVal = !%oldVal;
%this.coreModulesFilter = %newVal;
BrowserVisibilityPopup.checkItem(0,%newVal);
EditorSettings.setValue("Assets/Browser/showCoreModule", %newVal);
AssetBrowser.refresh();
AssetBrowser.loadDirectories();
}
function AssetBrowser::viewToolsModulesFilter(%this)
@ -107,11 +111,13 @@ function AssetBrowser::viewToolsModulesFilter(%this)
%oldVal = EditorSettings.value("Assets/Browser/showToolsModule", false);
%newVal = !%oldVal;
%this.toolsModulesFilter = %newVal;
BrowserVisibilityPopup.checkItem(1,%newVal);
EditorSettings.setValue("Assets/Browser/showToolsModule", %newVal);
AssetBrowser.refresh();
AssetBrowser.loadDirectories();
}
function AssetBrowser::viewPopulatedModulesFilter(%this)
@ -123,7 +129,7 @@ function AssetBrowser::viewPopulatedModulesFilter(%this)
EditorSettings.setValue("Assets/Browser/showOnlyPopulatedModule", %newVal);
AssetBrowser.refresh();
AssetBrowser.loadDirectories();
}
function AssetBrowser::toggleShowingFolders(%this)
@ -135,7 +141,7 @@ function AssetBrowser::toggleShowingFolders(%this)
EditorSettings.setValue("Assets/Browser/showFolders", %newVal);
AssetBrowser.refresh();
AssetBrowser.loadDirectories();
}
function AssetBrowser::toggleShowingEmptyFolders(%this)
@ -273,7 +279,7 @@ function AssetBrowser::hideDialog( %this )
Canvas.popDialog(AssetBrowser);
}
function AssetBrowser::buildPreviewArray( %this, %asset, %moduleName )
function AssetBrowser::buildAssetPreview( %this, %asset, %moduleName )
{
if(!isObject(%this.previewData))
{
@ -284,7 +290,7 @@ function AssetBrowser::buildPreviewArray( %this, %asset, %moduleName )
%previewImage = "core/art/warnmat";
if(ModuleDatabase.findModule(%moduleName, 1) !$= "")
if(/*%moduleName !$= "" && */ModuleDatabase.findModule(%moduleName, 1) !$= "")
{
%assetDesc = AssetDatabase.acquireAsset(%asset);
%assetName = AssetDatabase.getAssetName(%asset);
@ -296,7 +302,6 @@ function AssetBrowser::buildPreviewArray( %this, %asset, %moduleName )
%fullPath = strreplace(%fullPath, "/", "_");
if(isObject(%fullPath))
%assetDesc = %fullPath;
else
%assetDesc = new ScriptObject(%fullPath);
@ -359,10 +364,10 @@ function AssetBrowser::buildPreviewArray( %this, %asset, %moduleName )
%previewButton-->AssetPreviewBorderButton.extent = %previewSize;
//%previewButton-->AssetPreviewButton.internalName = %this.previewData.assetName@"Border";
%previewButton-->AssetPreviewButton.extent = %previewSize.x + %previewBounds SPC %previewSize.y + 24;
%previewButton-->AssetPreviewButton.tooltip = %this.previewData.tooltip;
%previewButton-->AssetPreviewButton.Command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );";
%previewButton-->AssetPreviewButton.altCommand = %this.previewData.doubleClickCommand;
%previewButton-->Button.extent = %previewSize.x + %previewBounds SPC %previewSize.y + 24;
%previewButton-->Button.tooltip = %this.previewData.tooltip;
%previewButton-->Button.Command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );";
%previewButton-->Button.altCommand = %doubleClickCommand;
//%previewButton-->AssetPreviewButton.icon = %this.previewData.previewImage;
%previewButton-->AssetNameLabel.position = 0 SPC %previewSize.y + %previewBounds - 16;
@ -379,11 +384,32 @@ function AssetBrowser::buildPreviewArray( %this, %asset, %moduleName )
function AssetBrowser::refresh(%this)
{
%this.navigateTo(%this.dirHandler.currentAddress);
if(!%this.dirty)
{
%this.dirty = true;
%this.schedule(1, "doRefresh");
}
}
function AssetBrowser::doRefresh(%this)
{
if(%this.dirty)
{
%this.navigateTo(%this.dirHandler.currentAddress);
//Forces a clean collapse of the tree for any not-really-exposed items
%dataItem = AssetBrowser-->filterTree.findItemByName("Data");
AssetBrowser-->filterTree.expandItem(%dataItem, false);
AssetBrowser-->filterTree.expandItem(%dataItem);
%this.dirty = false;
}
}
//
//
function AssetPreviewButton::onClick(%this)
/*function AssetPreviewButton::onClick(%this)
{
echo("CLICKED AN ASSET PREVIEW BUTTON");
}
@ -391,7 +417,7 @@ function AssetPreviewButton::onClick(%this)
function AssetPreviewButton::onDoubleClick(%this)
{
echo("DOUBLE CLICKED AN ASSET PREVIEW BUTTON");
}
}*/
//
//
@ -399,23 +425,60 @@ function AssetBrowser::loadDirectories( %this )
{
AssetBrowser-->filterTree.clear();
%dataItem = AssetBrowser-->filterTree.insertItem(0, "Data");
%dataItem = AssetBrowser-->filterTree.insertItem(0, "Content");
%dataItem = AssetBrowser-->filterTree.insertItem(1, "Data");
%this.dirHandler.loadFolders("Data", %dataItem);
//If set to, show core
if(%this.coreModulesFilter)
{
%coreItem = AssetBrowser-->filterTree.insertItem(0, "Core");
%coreItem = AssetBrowser-->filterTree.insertItem(1, "Core");
%this.dirHandler.loadFolders("Core", %coreItem);
}
//If set to, show tools
if(%this.toolsModulesFilter)
{
%toolsItem = AssetBrowser-->filterTree.insertItem(0, "Tools");
%toolsItem = AssetBrowser-->filterTree.insertItem(1, "Tools");
%this.dirHandler.loadFolders("Tools", %toolsItem);
}
//Add Non-Asset Scripted Objects. Datablock, etc based
%category = getWord( %breadcrumbPath, 1 );
%dataGroup = "DataBlockGroup";
if(%dataGroup.getCount() != 0)
{
%scriptedItem = AssetBrowser-->filterTree.insertItem(1, "Scripted");
for ( %i = 0; %i < %dataGroup.getCount(); %i++ )
{
%obj = %dataGroup.getObject(%i);
// echo ("Obj: " @ %obj.getName() @ " - " @ %obj.category );
if ( %obj.category $= "" && %obj.category == 0 )
continue;
//if ( %breadcrumbPath $= "" )
//{
%catItem = AssetBrowser-->filterTree.findItemByName(%obj.category);
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());
}*/
}
}
AssetPreviewArray.empty();
AssetBrowser-->filterTree.buildVisibleTree(true);
@ -443,15 +506,15 @@ function AssetBrowser::loadDirectories( %this )
AssetBrowser.newModuleId = "";
}
%dataItem = AssetBrowser-->filterTree.findItemByName("Data");
AssetBrowser-->filterTree.expandItem(%dataItem);
//%dataItem = AssetBrowser-->filterTree.findItemByName("Data");
//AssetBrowser-->filterTree.expandItem(%dataItem);
AssetBrowser.dirHandler.expandTreeToAddress(AssetBrowser.dirHandler.currentAddress);
%selectedItem = AssetBrowser.dirHandler.getFolderTreeItemFromAddress(AssetBrowser.dirHandler.currentAddress);
AssetBrowser-->filterTree.scrollVisibleByObjectId(%selectedItem);
AssetBrowser-->filterTree.buildVisibleTree();
AssetBrowser-->filterTree.buildVisibleTree(true);
AssetBrowser.refresh();
}
@ -739,18 +802,30 @@ function AssetListPanelInputs::onRightMouseDown(%this)
function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId)
{
%count = %this.getSelectedItemsCount();
if( %this.getSelectedItemsCount() > 0 && %itemId != 1)
%itemText = %this.getItemText(%itemId);
if( %this.getSelectedItemsCount() > 0 && (%itemText !$= "Data" && %itemText !$= "Core" && %itemText !$= "Tools"))
{
//AddNewAssetPopup.showPopup(Canvas);
//We have something clicked, so figure out if it's a sub-filter or a module filter, then push the correct
//popup menu
if(%this.getParentItem(%itemId) == 1)
%parentItem = %this.getParentItem(%itemId);
if(%this.getItemText(%parentItem) $= "Data") //if it's a data module, continue
{
//yep, module, push the all-inclusive popup
EditModulePopup.showPopup(Canvas);
//also set the module value for creation info
AssetBrowser.selectedModule = %this.getItemText(%itemId);
//find out if it's a folder or a module!
if(ModuleDatabase.findModule(%itemText))
{
//yep, module, push the all-inclusive popup
EditModulePopup.showPopup(Canvas);
//also set the module value for creation info
AssetBrowser.selectedModule = %itemText;
}
else
{
EditNonModulePopup.showPopup(Canvas);
EditNonModulePopup.targetFolder = %itemText;
}
}
else
{
@ -758,10 +833,14 @@ function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId)
EditFolderPopup.assetType = "Folder";
}
}
else if(%itemId == 1)
else if(%itemText $= "Data")
{
AddNewModulePopup.showPopup(Canvas);
}
else if(%itemText $= "Tools")
{
AddNewToolPopup.showPopup(Canvas);
}
}
//
@ -839,6 +918,18 @@ function AssetBrowserFilterTree::onSelect(%this, %itemId)
function AssetBrowser::rebuildAssetArray(%this)
{
if(!%this.previewArrayDirty)
{
%this.previewArrayDirty = true;
%this.schedule(16, "doRebuildAssetArray");
}
}
function AssetBrowser::doRebuildAssetArray(%this)
{
if(!%this.previewArrayDirty)
return;
%breadcrumbPath = AssetBrowser.dirHandler.currentAddress;
// we have to empty out the list; so when we create new guicontrols, these dont linger
@ -852,6 +943,9 @@ function AssetBrowser::rebuildAssetArray(%this)
%numAssetsFound = AssetDatabase.findAllAssets(%assetQuery);
%finalAssetCount = 0;
%searchText = AssetBrowserSearchFilter.getText();
%searchFilterActive = %searchText !$= "Search Assets...";
//now, we'll iterate through, and find the assets that are in this module, and this category
for( %i=0; %i < %numAssetsFound; %i++)
@ -864,7 +958,7 @@ function AssetBrowser::rebuildAssetArray(%this)
//clean up the path
%assetBasePath = strreplace(%assetBasePath, "//", "/");
if(%assetBasePath $= %breadcrumbPath)
if(%assetBasePath $= %breadcrumbPath || (%searchFilterActive && startsWith(%assetBasePath,%breadcrumbPath)))
{
//first, get the asset's module, as our major categories
%module = AssetDatabase.getAssetModule(%assetId);
@ -924,8 +1018,7 @@ function AssetBrowser::rebuildAssetArray(%this)
//stop adding after previewsPerPage is hit
%assetName = AssetDatabase.getAssetName(%assetId);
%searchText = AssetBrowserSearchFilter.getText();
if(%searchText !$= "Search Assets...")
if(%searchFilterActive)
{
if(strstr(strlwr(%assetName), strlwr(%searchText)) != -1)
{
@ -969,11 +1062,43 @@ function AssetBrowser::rebuildAssetArray(%this)
}
}
//Add Non-Asset Scripted Objects. Datablock, etc based
%category = getWord( %breadcrumbPath, 1 );
%dataGroup = "DataBlockGroup";
if(%dataGroup.getCount() != 0)
{
%scriptedItem = AssetBrowser-->filterTree.findItemByName("Scripted");
for ( %i = 0; %i < %dataGroup.getCount(); %i++ )
{
%obj = %dataGroup.getObject(%i);
// echo ("Obj: " @ %obj.getName() @ " - " @ %obj.category );
if ( %obj.category $= "" && %obj.category == 0 )
continue;
/*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());
}
}
}
AssetBrowser.currentPreviewPage = 0;
AssetBrowser.totalPages = 1;
for(%i=0; %i < %assetArray.count(); %i++)
AssetBrowser.buildPreviewArray( %assetArray.getValue(%i), %assetArray.getKey(%i) );
AssetBrowser.buildAssetPreview( %assetArray.getValue(%i), %assetArray.getKey(%i) );
AssetBrowser_FooterText.text = %finalAssetCount @ " Assets";
@ -998,8 +1123,8 @@ function AssetBrowser::rebuildAssetArray(%this)
}
}
if(!%validType)
continue;
//if(!%validType)
// continue;
}
else
{
@ -1008,6 +1133,8 @@ function AssetBrowser::rebuildAssetArray(%this)
if(%activeTypeFilterList !$= "")
AssetBrowser_FooterText.text = AssetBrowser_FooterText.text @ " | Active Type Filters: " @ %activeTypeFilterList;
%this.previewArrayDirty = false;
}
//
@ -1092,6 +1219,7 @@ function AssetBrowser::navigateTo(%this, %address, %historyNav)
}
%this.rebuildAssetArray();
%this.refresh();
}
function AssetBrowser::navigateHistoryForward(%this)

View file

@ -110,6 +110,8 @@ function AssetBrowser::onDropFile( %this, %filePath )
%this.addImportingAsset("GUIAsset", %filePath);
else if (%fileExt $= ".zip")
%this.onDropZipFile(%filePath);
else if( %fileExt $= "")
%this.onDropFolder(%filePath);
//Used to keep tabs on what files we were trying to import, used mainly in the event of
//adjusting configs and needing to completely reprocess the import
@ -129,6 +131,53 @@ function AssetBrowser::onDropZipFile(%this, %filePath)
echo("Dropped in a zip file with" SPC %count SPC "files inside!");
for (%i = 0; %i < %count; %i++)
{
%fileEntry = %zip.getFileEntry(%i);
%fileFrom = getField(%fileEntry, 0);
//First, we wanna scan to see if we have modules to contend with. If we do, we'll just plunk them in wholesale
//and not process their contents.
//If not modules, it's likely an art pack or other mixed files, so we'll import them as normal
/*if( (%fileExt $= ".png") || (%fileExt $= ".jpg") || (%fileExt $= ".bmp") || (%fileExt $= ".dds") )
%this.importAssetListArray.add("ImageAsset", %filePath);
else if( (%fileExt $= ".dae") || (%fileExt $= ".dts"))
%this.importAssetListArray.add("ShapeAsset", %filePath);
else if( (%fileExt $= ".ogg") || (%fileExt $= ".wav") || (%fileExt $= ".mp3"))
%this.importAssetListArray.add("SoundAsset", %filePath);
else if( (%fileExt $= ".gui") || (%fileExt $= ".gui.dso"))
%this.importAssetListArray.add("GUIAsset", %filePath);
//else if( (%fileExt $= ".cs") || (%fileExt $= ".dso"))
// %this.importAssetListArray.add("Script", %filePath);
else if( (%fileExt $= ".mis"))
%this.importAssetListArray.add("LevelAsset", %filePath);*/
// For now, if it's a .cs file, we'll assume it's a behavior.
//if (fileExt(%fileFrom) !$= ".cs")
// continue;
%fileTo = expandFilename("^tools/assetBrowser/importTemp/") @ %fileFrom;
%zip.extractFile(%fileFrom, %fileTo);
//exec(%fileTo);
}
%zip.delete();
//Next, we loop over the files and import them
}
function AssetBrowser::onDropFolder(%this, %filePath)
{
if(!%this.isVisible())
return;
%zip = new ZipObject();
%zip.openArchive(%filePath);
%count = %zip.getFileEntryCount();
echo("Dropped in a zip file with" SPC %count SPC "files inside!");
return;
for (%i = 0; %i < %count; %i++)
{
@ -391,7 +440,10 @@ function ImportAssetWindow::onWake(%this)
//Lets refresh our list
if(!ImportAssetWindow.isVisible())
return;
if(!isObject(%this.importTempDirHandler))
%this.importTempDirHandler = makedirectoryHandler(0, "", "");
if(!isObject(AssetImportSettings))
{
new Settings(AssetImportSettings)
@ -420,6 +472,8 @@ function ImportAssetWindow::onWake(%this)
ImportAssetConfigList.setSelected(0);
ImportActivityLog.empty();
%this.refresh();
}
function ImportAssetWindow::reloadImportOptionConfigs(%this)
@ -973,7 +1027,6 @@ function NewAssetsViewTree::onRightMouseDown(%this, %itemId)
}
else
{
ImportAssetActions.enableItem(1, false);
ImportAssetActions.showPopup(Canvas);
}
}
@ -1510,6 +1563,8 @@ function ImportAssetWindow::Close(%this)
//Some cleanup
ImportAssetWindow.importingFilesArray.empty();
%this.importTempDirHandler.deleteFolder("tools/assetBrowser/importTemp/*/");
Canvas.popDialog();
}

View file

@ -67,8 +67,6 @@ function setupImportConfigSettingsList()
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/UseDiffuseSuffixOnOriginImage", "Use Diffuse Suffix for Origin Image", "bool", "", "1", "");
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/UseExistingMaterials", "Use Existing Materials", "bool", "", "1", "");
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/IgnoreMaterials", "Ignore Materials", "command", "", "", "");
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/AlwaysPresentImageMaps", "Always Present Image Maps", "bool",
"Wether to always display all normal material map fields, even if an image isn't detected.", "", "");
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/PopulateMaterialMaps", "Populate Material Maps", "bool", "", "1", "");
//Animations
@ -321,7 +319,6 @@ function ImportAssetConfigEditorWindow::addNewConfig(%this)
AssetImportSettings.setValue("Materials/CreateComposites", "1");
AssetImportSettings.setValue("Materials/UseDiffuseSuffixOnOriginImage", "1");
AssetImportSettings.setValue("Materials/UseExistingMaterials", "1");
AssetImportSettings.setValue("Materials/AlwaysPresentImageMaps", "0");
AssetImportSettings.setValue("Materials/PopulateMaterialMaps", "1");
//Animations

View file

@ -1,3 +1,5 @@
//Builds the preview data of the asset for the Asset Browser
function AssetBrowser::build_AssetPreview(%this, %assetDef, %previewData)
{
%previewData.assetName = %assetDef.assetName;
@ -11,59 +13,73 @@ function AssetBrowser::build_AssetPreview(%this, %assetDef, %previewData)
%previewData.tooltip = %assetDef.gameObjectName;
}
//Some last-step setup for the creation of the new asset before we do the actual making
//This is generally intended to just set up any type-specific fields for creation
function AssetBrowser::setupCreateNew_Asset(%this)
{
}
//Performs the actual creation of the asset, including loose file copy or generation
function AssetBrowser::create_Asset(%this)
{
}
//This is a pre-process step to prepare the asset item for import
function AssetBrowser::prepareImport_Asset(%this, %assetItem)
{
}
function AssetBrowser::setupCreateNew_Asset(%this)
{
}
function AssetBrowser::create_Asset(%this)
{
}
//Performs the action of actually importing the asset item
function AssetBrowser::import_Asset(%this, %assetDef)
{
}
//Editing the asset
function AssetBrowser::edit_Asset(%this, %assetDef)
{
}
//Duplicates the asset
function AssetBrowser::duplicate_Asset(%this, %assetDef, %targetModule)
{
}
//Renames the asset
function AssetBrowser::rename_Asset(%this, %assetDef, %newAssetName)
{
}
//Deletes the asset
function AssetBrowser::delete_Asset(%this, %assetDef)
{
}
//Moves the asset to a new path/module
function AssetBrowser::move_Asset(%this, %assetDef, %destinationFolder)
{
}
//Drag and drop action onto a GUI control
function AssetBrowser::dragAndDrop_Asset(%this, %assetDef, %dropTarget)
{
if(!isObject(%dropTarget))
return;
}
//Even for when
function AssetBrowser::on_AssetEditorDropped(%this, %assetDef, %position)
{
}
//Clicking of the button for the asset type inspector field
function GuiInspectorType_AssetPtr::onClick( %this, %fieldName )
{
//Get our data
%obj = %this.getInspector().getInspectObject(0);
}
//Drag and droppin onto the asset type inspector field
function GuiInspectorType_AssetPtr::onControlDropped( %this, %payload, %position )
{

View file

@ -1,3 +1,16 @@
function AssetBrowser::buildCppAssetPreview(%this, %assetDef, %previewData)
{
%previewData.assetName = %assetDef.assetName;
%previewData.assetPath = %assetDef.codeFilePath;
%previewData.doubleClickCommand = "echo(\"Not yet implemented to edit C++ files from the editor\");";//"EditorOpenFileInTorsion( "@%previewData.assetPath@", 0 );";
%previewData.previewImage = "tools/assetBrowser/art/cppIcon";
%previewData.assetFriendlyName = %assetDef.assetName;
%previewData.assetDesc = %assetDef.description;
%previewData.tooltip = %assetDef.assetName;
}
function AssetBrowser::createCppAsset(%this)
{
%moduleName = AssetBrowser.newAssetSettings.moduleName;
@ -129,15 +142,50 @@ function AssetBrowser::createCppAsset(%this)
return %tamlpath;
}
function AssetBrowser::buildCppAssetPreview(%this, %assetDef, %previewData)
function AssetBrowser::editCppAsset(%this, %assetDef)
{
%previewData.assetName = %assetDef.assetName;
%previewData.assetPath = %assetDef.codeFilePath;
%previewData.doubleClickCommand = "echo(\"Not yet implemented to edit C++ files from the editor\");";//"EditorOpenFileInTorsion( "@%previewData.assetPath@", 0 );";
}
//Renames the asset
function AssetBrowser::renameCppAsset(%this, %assetDef, %newAssetName)
{
%newCodeLooseFilename = renameAssetLooseFile(%assetDef.codefile, %newAssetName);
%previewData.previewImage = "tools/assetBrowser/art/cppIcon";
if(!%newCodeLooseFilename $= "")
return;
%newHeaderLooseFilename = renameAssetLooseFile(%assetDef.headerFile, %newAssetName);
%previewData.assetFriendlyName = %assetDef.assetName;
%previewData.assetDesc = %assetDef.description;
%previewData.tooltip = %assetDef.assetName;
}
if(!%newHeaderLooseFilename $= "")
return;
%assetDef.codefile = %newCodeLooseFilename;
%assetDef.headerFile = %newHeaderLooseFilename;
%assetDef.saveAsset();
renameAssetFile(%assetDef, %newAssetName);
}
//Deletes the asset
function AssetBrowser::deleteCppAsset(%this, %assetDef)
{
AssetDatabase.deleteAsset(%assetDef.getAssetId(), true);
}
//Moves the asset to a new path/module
function AssetBrowser::moveCppAsset(%this, %assetDef, %destination)
{
%currentModule = AssetDatabase.getAssetModule(%assetDef.getAssetId());
%targetModule = AssetBrowser.getModuleFromAddress(%destination);
%newAssetPath = moveAssetFile(%assetDef, %destination);
if(%newAssetPath $= "")
return false;
moveAssetLooseFile(%assetDef.codeFile, %destination);
moveAssetLooseFile(%assetDef.headerFile, %destination);
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);
}

View file

@ -43,6 +43,50 @@ function AssetBrowser::editCubemapAsset(%this, %assetDef)
CubemapEditor.openCubemapAsset(%assetDef);
}
//Renames the asset
function AssetBrowser::renameCubemapAsset(%this, %assetDef, %newAssetName)
{
/*%newCodeLooseFilename = renameAssetLooseFile(%assetDef.codefile, %newAssetName);
if(!%newCodeLooseFilename $= "")
return;
%newHeaderLooseFilename = renameAssetLooseFile(%assetDef.headerFile, %newAssetName);
if(!%newHeaderLooseFilename $= "")
return;
%assetDef.codefile = %newCodeLooseFilename;
%assetDef.headerFile = %newHeaderLooseFilename;
%assetDef.saveAsset();
renameAssetFile(%assetDef, %newAssetName);*/
}
//Deletes the asset
function AssetBrowser::deleteCubemapAsset(%this, %assetDef)
{
AssetDatabase.deleteAsset(%assetDef.getAssetId(), true);
}
//Moves the asset to a new path/module
function AssetBrowser::moveCubemapAsset(%this, %assetDef, %destination)
{
/*%currentModule = AssetDatabase.getAssetModule(%assetDef.getAssetId());
%targetModule = AssetBrowser.getModuleFromAddress(%destination);
%newAssetPath = moveAssetFile(%assetDef, %destination);
if(%newAssetPath $= "")
return false;
moveAssetLooseFile(%assetDef.codeFile, %destination);
moveAssetLooseFile(%assetDef.headerFile, %destination);
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);*/
}
function GuiInspectorTypeCubemapAssetPtr::onControlDropped( %this, %payload, %position )
{
Canvas.popDialog(EditorDragAndDropLayer);

View file

@ -50,7 +50,7 @@ function AssetBrowser::buildFolderPreview(%this, %assetDef, %previewData)
//%previewData.assetFriendlyName = %assetDef.assetName;
%previewData.assetDesc = %assetDef.description;
%previewData.tooltip = %assetDef.dirPath;
%previewData.doubleClickCommand = "AssetBrowser.navigateTo(\""@ %assetDef.dirPath @ "/" @ %assetDef.assetName @"\")";//browseTo %assetDef.dirPath / %assetDef.assetName
%previewData.doubleClickCommand = "AssetBrowser.schedule(10, \"navigateTo\",\""@ %assetDef.dirPath @ "/" @ %assetDef.assetName @"\");";//browseTo %assetDef.dirPath / %assetDef.assetName
}
function AssetBrowser::renameFolder(%this, %folderPath, %newFolderName)

View file

@ -234,6 +234,31 @@ function AssetBrowser::renameGameObjectAsset(%this, %assetDef, %newAssetId, %ori
TAMLWrite(%gameObj, %newGOFile);
}
//Deletes the asset
function AssetBrowser::deleteGameObjectAsset(%this, %assetDef)
{
AssetDatabase.deleteAsset(%assetDef.getAssetId(), true);
}
//Moves the asset to a new path/module
function AssetBrowser::moveGameObjectAsset(%this, %assetDef, %destination)
{
%currentModule = AssetDatabase.getAssetModule(%assetDef.getAssetId());
%targetModule = AssetBrowser.getModuleFromAddress(%destination);
%newAssetPath = moveAssetFile(%assetDef, %destination);
if(%newAssetPath $= "")
return false;
moveAssetLooseFile(%assetDef.scriptFile, %destination);
moveAssetLooseFile(%assetDef.TAMLFile, %destination);
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);
}
function AssetBrowser::buildGameObjectAssetPreview(%this, %assetDef, %previewData)
{
%previewData.assetName = %assetDef.assetName;

View file

@ -100,6 +100,51 @@ function AssetBrowser::editGUIAsset(%this, %assetDef)
GuiEditContent(%assetDef.assetName);
}
//Renames the asset
function AssetBrowser::renameGUIAsset(%this, %assetDef, %newAssetName)
{
%newScriptLooseFilename = renameAssetLooseFile(%assetDef.scriptFile, %newAssetName);
if(!%newScriptLooseFilename $= "")
return;
%newGUILooseFilename = renameAssetLooseFile(%assetDef.guiFile, %newAssetName);
if(!%newGUILooseFilename $= "")
return;
%assetDef.scriptFile = %newScriptLooseFilename;
%assetDef.guiFile = %newGUILooseFilename;
%assetDef.saveAsset();
renameAssetFile(%assetDef, %newAssetName);
}
//Deletes the asset
function AssetBrowser::deleteGUIAsset(%this, %assetDef)
{
AssetDatabase.deleteAsset(%assetDef.getAssetId(), true);
}
//Moves the asset to a new path/module
function AssetBrowser::moveGUIAsset(%this, %assetDef, %destination)
{
%currentModule = AssetDatabase.getAssetModule(%assetDef.getAssetId());
%targetModule = AssetBrowser.getModuleFromAddress(%destination);
%newAssetPath = moveAssetFile(%assetDef, %destination);
if(%newAssetPath $= "")
return false;
moveAssetLooseFile(%assetDef.guifile, %destination);
moveAssetLooseFile(%assetDef.scriptFile, %destination);
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);
}
function AssetBrowser::buildGUIAssetPreview(%this, %assetDef, %previewData)
{
%previewData.assetName = %assetDef.assetName;

View file

@ -81,9 +81,11 @@ function AssetBrowser::prepareImportImageAsset(%this, %assetItem)
if(getAssetImportConfigValue("Materials/PopulateMaterialMaps", "1") == 1)
{
if(%foundSuffixType $= "diffuse")
%materialAsset.diffuseImageAsset = %assetItem;
%assetItem.ImageType = "Diffuse";
//%materialAsset.diffuseImageAsset = %assetItem;
else if(%foundSuffixType $= "normal")
%materialAsset.normalImageAsset = %assetItem;
%assetItem.ImageType = "Normal";
//%materialAsset.normalImageAsset = %assetItem;
else if(%foundSuffixType $= "metalness")
%materialAsset.metalnessImageAsset = %assetItem;
else if(%foundSuffixType $= "roughness")
@ -173,28 +175,38 @@ function AssetBrowser::buildImageAssetPreview(%this, %assetDef, %previewData)
%previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef;
}
//Renames the asset
function AssetBrowser::renameImageAsset(%this, %assetDef, %newAssetName)
{
%newFilename = renameAssetLooseFile(%assetDef.imageFile, %newAssetName);
if(!%newFilename $= "")
return;
%assetDef.imageFile = %newFilename;
%assetDef.saveAsset();
renameAssetFile(%assetDef, %newAssetName);
}
//Deletes the asset
function AssetBrowser::deleteImageAsset(%this, %assetDef)
{
AssetDatabase.deleteAsset(%assetDef.getAssetId(), true);
}
//Moves the asset to a new path/module
function AssetBrowser::moveImageAsset(%this, %assetDef, %destination)
{
%currentModule = AssetDatabase.getAssetModule(%assetDef.getAssetId());
%targetModule = AssetBrowser.getModuleFromAddress(%destination);
if(%currentModule $= %targetModule)
{
//just move the files
%assetPath = makeFullPath(AssetDatabase.getAssetFilePath(%assetDef.getAssetId()));
%assetFilename = fileName(%assetPath);
%newAssetPath = %destination @ "/" @ %assetFilename;
%copiedSuccess = pathCopy(%assetPath, %destination @ "/" @ %assetFilename);
%deleteSuccess = fileDelete(%assetPath);
%imagePath = %assetDef.imageFile;
%imageFilename = fileName(%imagePath);
%copiedSuccess = pathCopy(%imagePath, %destination @ "/" @ %imageFilename);
%deleteSuccess = fileDelete(%imagePath);
}
%newAssetPath = moveAssetFile(%assetDef, %destination);
if(%newAssetPath $= "")
return false;
moveAssetLooseFile(%assetDef.imageFile, %destination);
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);

View file

@ -35,11 +35,19 @@ function AssetBrowser::createLevelAsset(%this)
TamlWrite(%asset, %tamlpath);
if(!pathCopy("tools/levels/BlankRoom.mis", %levelPath, false))
//Special-case where if we're doing a save-as action, it'll base on the current scene.
//Otherwise we're doing a basic create action, so just base it off our editor's default
if(EditorGui.saveAs)
{
getRootScene().save(%levelPath);
}
else if(!pathCopy("tools/levels/DefaultEditorLevel.mis", %levelPath, false))
{
echo("Unable to copy template level file!");
}
replaceInFile(%levelPath, "EditorTemplateLevel", %assetName);
//Generate the associated files
DecalManagerSave( %assetPath @ %asset.DecalsFile );
PostFXManager::savePresetHandler( %assetPath @ %asset.PostFXPresetFile );
@ -61,6 +69,45 @@ function AssetBrowser::editLevelAsset(%this, %assetDef)
{
schedule( 1, 0, "EditorOpenMission", %assetDef);
}
//Renames the asset
function AssetBrowser::renameLevelAsset(%this, %assetDef, %newAssetName)
{
%newFilename = renameAssetLooseFile(%assetDef.LevelFile, %newAssetName);
if(!%newFilename $= "")
return;
//TODO the other loose files
%assetDef.LevelFile = %newFilename;
%assetDef.saveAsset();
renameAssetFile(%assetDef, %newAssetName);
}
//Deletes the asset
function AssetBrowser::deleteLevelAsset(%this, %assetDef)
{
AssetDatabase.deleteAsset(%assetDef.getAssetId(), true);
}
//Moves the asset to a new path/module
function AssetBrowser::moveLevelAsset(%this, %assetDef, %destination)
{
%currentModule = AssetDatabase.getAssetModule(%assetDef.getAssetId());
%targetModule = AssetBrowser.getModuleFromAddress(%destination);
%newAssetPath = moveAssetFile(%assetDef, %destination);
if(%newAssetPath $= "")
return false;
moveAssetLooseFile(%assetDef.LevelFile, %destination);
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);
}
function AssetBrowser::buildLevelAssetPreview(%this, %assetDef, %previewData)
{

View file

@ -45,6 +45,43 @@ function AssetBrowser::editMaterialAsset(%this, %assetDef)
AssetBrowser.hideDialog();
}
//Renames the asset
function AssetBrowser::renameMaterialAsset(%this, %assetDef, %newAssetName)
{
%newFilename = renameAssetLooseFile(%assetDef.scriptPath, %newAssetName);
if(!%newFilename $= "")
return;
%assetDef.scriptPath = %newFilename;
%assetDef.saveAsset();
renameAssetFile(%assetDef, %newAssetName);
}
//Deletes the asset
function AssetBrowser::deleteMaterialAsset(%this, %assetDef)
{
AssetDatabase.deleteAsset(%assetDef.getAssetId(), true);
}
//Moves the asset to a new path/module
function AssetBrowser::moveMaterialAsset(%this, %assetDef, %destination)
{
%currentModule = AssetDatabase.getAssetModule(%assetDef.getAssetId());
%targetModule = AssetBrowser.getModuleFromAddress(%destination);
%newAssetPath = moveAssetFile(%assetDef, %destination);
if(%newAssetPath $= "")
return false;
moveAssetLooseFile(%assetDef.scriptPath, %destination);
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);
}
function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
{
ImportActivityLog.add("Preparing Shape for Import: " @ %assetItem.assetName);
@ -95,14 +132,6 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
%diffuseAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%assetItem.diffuseImageAsset = %diffuseAsset;
}
else if(getAssetImportConfigValue("Materials/AlwaysPresentImageMaps", "0") == 1)
{
//In the event we don't have this image asset, but we DO wish to always display the field(affording when names don't aline with
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%diffuseTypeSuffixes, ",;") == 0 ? "_albedo" : getToken(%diffuseTypeSuffixes, ",;", 0);
%diffuseAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.diffuseImageAsset = %diffuseAsset;
}
}
//Now, iterate over our comma-delimited suffixes to see if we have any matches. We'll use the first match in each case, if any.
@ -120,14 +149,6 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
%normalAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%assetItem.normalImageAsset = %normalAsset;
}
else if(getAssetImportConfigValue("Materials/AlwaysPresentImageMaps", "0") == 1)
{
//In the event we don't have this image asset, but we DO wish to always display the field(affording when names don't aline with
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%normalTypeSuffixes, ",;") == 0 ? "_normal" : getToken(%normalTypeSuffixes, ",;", 0);
%normalAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.normalImageAsset = %normalAsset;
}
}
if(%assetItem.metalImageAsset $= "")
@ -143,14 +164,6 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
%metalAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%assetItem.metalImageAsset = %metalAsset;
}
else if(getAssetImportConfigValue("Materials/AlwaysPresentImageMaps", "0") == 1)
{
//In the event we don't have this image asset, but we DO wish to always display the field(affording when names don't aline with
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%metalnessTypeSuffixes, ",;") == 0 ? "_metalness" : getToken(%metalnessTypeSuffixes, ",;", 0);
%metalAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.metalImageAsset = %metalAsset;
}
}
if(%assetItem.roughnessImageAsset $= "")
@ -166,14 +179,6 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
%roughnessAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%assetItem.roughnessImageAsset = %roughnessAsset;
}
else if(getAssetImportConfigValue("Materials/AlwaysPresentImageMaps", "0") == 1)
{
//In the event we don't have this image asset, but we DO wish to always display the field(affording when names don't aline with
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%roughnessTypeSuffixes, ",;") == 0 ? "_roughness" : getToken(%roughnessTypeSuffixes, ",;", 0);
%roughnessAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.roughnessImageAsset = %roughnessAsset;
}
}
if(%assetItem.smoothnessImageAsset $= "")
@ -189,14 +194,6 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
%smoothnessAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%assetItem.SmoothnessImageAsset = %smoothnessAsset;
}
else if(getAssetImportConfigValue("Materials/AlwaysPresentImageMaps", "0") == 1)
{
//In the event we don't have this image asset, but we DO wish to always display the field(affording when names don't aline with
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%smoothnessTypeSuffixes, ",;") == 0 ? "_smoothness" : getToken(%smoothnessTypeSuffixes, ",;", 0);
%smoothnessAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.SmoothnessImageAsset = %smoothnessAsset;
}
}
if(%assetItem.AOImageAsset $= "")
@ -212,14 +209,6 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
%AOAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%assetItem.AOImageAsset = %AOAsset;
}
else if(getAssetImportConfigValue("Materials/AlwaysPresentImageMaps", "0") == 1)
{
//In the event we don't have this image asset, but we DO wish to always display the field(affording when names don't aline with
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%aoTypeSuffixes, ",;") == 0 ? "_AO" : getToken(%aoTypeSuffixes, ",;", 0);
%AOAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.AOImageAsset = %AOAsset;
}
}
if(%assetItem.compositeImageAsset $= "")
@ -235,21 +224,12 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
%compositeAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%assetItem.compositeImageAsset = %compositeAsset;
}
else if(getAssetImportConfigValue("Materials/AlwaysPresentImageMaps", "0") == 1)
{
//In the event we don't have this image asset, but we DO wish to always display the field(affording when names don't aline with
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%compositeTypeSuffixes, ",;") == 0 ? "_composite" : getToken(%compositeTypeSuffixes, ",;", 0);
%compositeAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.compositeImageAsset = %compositeAsset;
}
}
//If after the above we didn't find any, check to see if we should be generating one
if(%assetItem.compositeImageAsset $= "" &&
(%assetItem.roughnessImageAsset !$= "" || %assetItem.AOImageAsset !$= "" || %assetItem.metalnessImageAsset !$= "") &&
getAssetImportConfigValue("Materials/CreateComposites", "1") == 1 &&
getAssetImportConfigValue("Materials/AlwaysPresentImageMaps", "0") == 0)
getAssetImportConfigValue("Materials/CreateComposites", "1") == 1)
{
%assetItem.roughnessImageAsset.skip = true;
%assetItem.AOImageAsset.skip = true;

View file

@ -111,6 +111,57 @@ function AssetBrowser::createPostEffectAsset(%this)
return %tamlpath;
}
//Renames the asset
function AssetBrowser::renamePostEffectAsset(%this, %assetDef, %newAssetName)
{
%newScriptFilename = renameAssetLooseFile(%assetDef.scriptPath, %newAssetName);
if(!%newScriptFilename $= "")
return;
%newHLSLFilename = renameAssetLooseFile(%assetDef.hlslShader, %newAssetName);
if(!%newHLSLFilename $= "")
return;
%newGLSLFilename = renameAssetLooseFile(%assetDef.glslShader, %newAssetName);
if(!%newGLSLFilename $= "")
return;
%assetDef.scriptPath = %newScriptFilename;
%assetDef.hlslShader = %newHLSLFilename;
%assetDef.glslShader = %newGLSLFilename;
%assetDef.saveAsset();
renameAssetFile(%assetDef, %newAssetName);
}
//Deletes the asset
function AssetBrowser::deletePostEffectAsset(%this, %assetDef)
{
AssetDatabase.deleteAsset(%assetDef.getAssetId(), true);
}
//Moves the asset to a new path/module
function AssetBrowser::movePostEffectAsset(%this, %assetDef, %destination)
{
%currentModule = AssetDatabase.getAssetModule(%assetDef.getAssetId());
%targetModule = AssetBrowser.getModuleFromAddress(%destination);
%newAssetPath = moveAssetFile(%assetDef, %destination);
if(%newAssetPath $= "")
return false;
moveAssetLooseFile(%assetDef.scriptPath, %destination);
moveAssetLooseFile(%assetDef.hlslShader, %destination);
moveAssetLooseFile(%assetDef.glslShader, %destination);
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);
}
function AssetBrowser::buildPostEffectAssetPreview(%this, %assetDef, %previewData)
{
%previewData.assetName = %assetDef.assetName;

View file

@ -53,87 +53,41 @@ function AssetBrowser::onScriptAssetEditorDropped(%this, %assetDef, %position)
return;
}
//Renames the asset
function AssetBrowser::renameScriptAsset(%this, %assetDef, %newAssetName)
{
%assetId = %assetDef.getAssetID();
%newFilename = renameAssetLooseFile(%assetDef.scriptFile, %newAssetName);
%module = AssetDatabase.getAssetModule(%assetId);
%scriptPath = %assetDef.scriptFile;
%newScriptPath = filePath(%scriptPath) @ "/" @ %newAssetName @ fileExt(%scriptPath);
%copiedSuccess = pathCopy(%scriptPath, %newScriptPath);
%looseFilepath = fileName(%newScriptPath);
%assetDef.scriptFile = "\"@AssetFile=" @ %looseFilepath @ "\"";
if(!%newFilename $= "")
return;
%assetDef.scriptFile = %newFilename;
%assetDef.saveAsset();
AssetDatabase.renameDeclaredAsset("\"" @ %module @ ":" @ %newAssetName @ "\"");
//%assetFilePath = makeFullPath(AssetDatabase.getAssetFilePath(%assetId));
//%newAssetFilePath = %newFullPath @ "/" @ fileName(%assetFilePath);
//%copiedSuccess = pathCopy(%assetFilePath, %newAssetFilePath);
fileDelete(%scriptPath);
//ModuleDatabase.unloadExplicit(%module.getModuleId());
//ModuleDatabase.loadExplicit(%module.getModuleId());
renameAssetFile(%assetDef, %newAssetName);
}
//Deletes the asset
function AssetBrowser::deleteScriptAsset(%this, %assetDef)
{
%assetId = %assetDef.getAssetID();
%module = AssetDatabase.getAssetModule(%assetId);
%assetFilePath = makeFullPath(AssetDatabase.getAssetFilePath(%assetId));
%scriptPath = %assetDef.scriptFile;
fileDelete(%assetFilePath);
fileDelete(%scriptPath);
//they're different moduels now, so we gotta unload/reload both
ModuleDatabase.unloadExplicit(%module.getModuleId());
ModuleDatabase.unloadExplicit(%newModule.getModuleId());
AssetDatabase.deleteAsset(%assetDef.getAssetId(), true);
}
//Moves the asset to a new path/module
function AssetBrowser::moveScriptAsset(%this, %assetDef, %destination)
{
%newFullPath = makeFullPath(%destination);
%currentModule = AssetDatabase.getAssetModule(%assetDef.getAssetId());
%targetModule = AssetBrowser.getModuleFromAddress(%destination);
%assetId = %assetDef.getAssetID();
%newAssetPath = moveAssetFile(%assetDef, %destination);
%module = AssetDatabase.getAssetModule(%assetId);
if(%newAssetPath $= "")
return false;
moveAssetLooseFile(%assetDef.scriptFile, %destination);
%assetFilePath = makeFullPath(AssetDatabase.getAssetFilePath(%assetId));
%newAssetFilePath = %newFullPath @ "/" @ fileName(%assetFilePath);
%copiedSuccess = pathCopy(%assetFilePath, %newAssetFilePath);
%scriptPath = %assetDef.scriptFile;
%newScriptPath = %newFullPath @ "/" @ fileName(%scriptPath);
%copiedSuccess = pathCopy(%scriptPath, %newScriptPath);
fileDelete(%assetFilePath);
fileDelete(%scriptPath);
//thrash the modules and reload them
%newModule = %this.dirHandler.getModuleFromAddress(%newFullPath);
//if we didn't move modules, then we don't need to do anything other than refresh the assets within it
if(%module == %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(%module.getModuleId());
ModuleDatabase.loadExplicit(%module.getModuleId());
ModuleDatabase.unloadExplicit(%newModule.getModuleId());
ModuleDatabase.loadExplicit(%newModule.getModuleId());
}
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);
}
function AssetBrowser::buildScriptAssetPreview(%this, %assetDef, %previewData)

View file

@ -18,26 +18,44 @@ function makedirectoryHandler(%targetTree, %folderExclusionList, %searchFilter)
function directoryHandler::loadFolders(%this, %path, %parentId)
{
%modulesList = ModuleDatabase.findModules();
//utilize home dir project setting here
%paths = getDirectoryList(%path);
for(%i=0; %i < getFieldCount(%paths); %i++)
{
%childPath = getField(%paths, %i);
%fullChildPath = makeFullPath(%path @ "/" @ %childPath);
%folderCount = getTokenCount(%childPath, "/");
for(%f=0; %f < %folderCount; %f++)
{
%folderName = getToken(%childPath, "/", %f);
%parentName = %this.treeCtrl.getItemText(%parentId);
//we don't need to display the shadercache folder
if(%parentId == 1 && (%folderName $= "shaderCache" || %folderName $= "cache"))
if(%parentName $= "Data" && (%folderName $= "shaderCache" || %folderName $= "cache"))
continue;
%iconIdx = 3;
if(ModuleDatabase.findModule(%folderName) !$= "")
%iconIdx = 1;
//Lets see if any modules match our current path)
for(%m=0; %m < getWordCount(%modulesList); %m++)
{
%moduleDef = getWord(%modulesList, %m);
if(%moduleDef.modulePath $= %fullChildPath)
{
%iconIdx = 1;
break;
}
}
//if(ModuleDatabase.findModule(%folderName) !$= "")
// %iconIdx = 1;
%searchFoldersText = %this.searchFilter;
if(%searchFoldersText !$= "Search Folders...")
@ -204,6 +222,8 @@ function directoryHandler::expandTreeToAddress(%this, %address)
%curItem = %this.treeCtrl.findChildItemByName(%curItem, %folderName);
%this.treeCtrl.expandItem(%curItem);
}
%this.treeCtrl.expandItem(0);
}
function directoryHandler::createFolder(%this, %folderPath)

View file

@ -13,7 +13,22 @@ function AssetBrowser::editAsset(%this, %assetDef)
//Find out what type it is
//If the passed-in definition param is blank, then we're likely called via a popup
if(%assetDef $= "")
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
{
if(AssetDatabase.isDeclaredAsset(EditAssetPopup.assetId))
{
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
}
else
{
//if it's not a valid asset at all, then it's probably a folder
%folder = strreplace(EditAssetPopup.assetId, ":", "/");
if(isDirectory(%folder))
{
AssetBrowser.navigateTo(%folder);
}
}
}
%assetType = %assetDef.getClassName();
@ -132,6 +147,51 @@ function AssetBrowser::performRenameAsset(%this, %originalAssetName, %newName)
AssetBrowser-->filterTree.buildVisibleTree();
}
function renameAssetFile(%assetDef, %newName)
{
%assetId = %assetDef.getAssetID();
%module = AssetDatabase.getAssetModule(%assetId);
%moduleId = %module.moduleId;
%assetPath = AssetDatabase.getAssetFilePath(%assetId);
%newPath = filePath(%assetPath) @ "/" @ %newName @ ".asset.taml";
%copiedSuccess = pathCopy(%assetPath, %newPath);
if(!%copiedSuccess)
return "";
%deleteSuccess = fileDelete(%assetPath);
if(!%deleteSuccess)
return "";
//Remove the old declaration
AssetDatabase.removeDeclaredAsset(%assetId);
//Add with the new file
AssetDatabase.addDeclaredAsset(%module, %newPath);
//Perform the rename in the file/system itself
AssetDatabase.renameDeclaredAsset(%assetId, %moduleId @ ":" @ %newName);
}
function renameAssetLooseFile(%file, %newName)
{
%newPath = filePath(%file) @ "/" @ %newName @ fileExt(%file);
%copiedSuccess = pathCopy(%file, %newPath);
if(!%copiedSuccess)
return "";
%deleteSuccess = fileDelete(%file);
if(!%deleteSuccess)
return "";
return fileName(%newPath);
}
function AssetNameField::onReturn(%this)
{
%this.clearFirstResponder();
@ -165,6 +225,39 @@ function AssetBrowser::moveAsset(%this, %assetId, %destination)
%this.refresh();
}
function moveAssetFile(%assetDef, %destinationPath)
{
%assetPath = makeFullPath(AssetDatabase.getAssetFilePath(%assetDef.getAssetId()));
%assetFilename = fileName(%assetPath);
%newAssetPath = %destination @ "/" @ %assetFilename;
%copiedSuccess = pathCopy(%assetPath, %destination @ "/" @ %assetFilename);
if(!%copiedSuccess)
return "";
%deleteSuccess = fileDelete(%assetPath);
if(!%deleteSuccess)
return "";
return %newAssetPath;
}
function moveAssetLooseFile(%file, %destinationPath)
{
%filename = fileName(%file);
%copiedSuccess = pathCopy(%file, %destinationPath @ "/" @ %filename);
if(!%copiedSuccess)
return false;
%deleteSuccess = fileDelete(%file);
return %deleteSuccess;
}
//------------------------------------------------------------
function AssetBrowser::duplicateAsset(%this, %targetModule)

View file

@ -1,10 +1,31 @@
//
function AssetBrowser::ConvertFolderIntoModule(%this, %folderName)
{
if(!isDirectory("data/" @ %folderName))
return;
AssetBrowser_AddModule-->moduleName.text = %folderName;
AssetBrowser_addModuleWindow.callbackFunction = "AssetBrowser.loadDirectories();";
AssetBrowser_addModuleWindow.CreateNewModule();
}
function AssetBrowser::CreateNewModule(%this)
{
Canvas.pushDialog(AssetBrowser_AddModule);
AssetBrowser_addModuleWindow.selectWindow();
AssetBrowser_addModuleWindow.callbackFunction = "AssetBrowser.loadFilters();";
AssetBrowser_addModuleWindow.callbackFunction = "AssetBrowser.loadDirectories();";
}
function AssetBrowser::createNewEditorTool(%this)
{
Canvas.pushDialog(AssetBrowser_AddModule);
AssetBrowser_addModuleWindow.selectWindow();
AssetBrowser_addModuleWindow.callbackFunction = "AssetBrowser.loadDirectories();";
AssetBrowser_addModuleWindow.CreateNewModule();
}
function AssetBrowser_editModule::saveModule(%this)

View file

@ -185,6 +185,18 @@ function AssetBrowser::buildPopupMenus(%this)
};
}
if( !isObject( EditNonModulePopup ) )
{
new PopupMenu( EditNonModulePopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
item[ 0 ] = "Turn Folder into Module" TAB "" TAB "AssetBrowser.ConvertFolderIntoModule();";
};
}
//Some assets are not yet ready/implemented, so disable their creation here
AddNewArtAssetPopup.enableItem(6, false); //shape
AddNewArtAssetPopup.enableItem(7, false); //shape animation
@ -257,8 +269,6 @@ function AssetBrowser::buildPopupMenus(%this)
}
}
AssetBrowser.toggleAssetTypeFilter(0);
//Browser visibility menu
if( !isObject( BrowserVisibilityPopup ) )
{
@ -370,10 +380,27 @@ function AssetBrowser::buildPopupMenus(%this)
class = "EditorWorldMenu";
item[0] = "Add New Asset" TAB "" TAB "ImportAssetWindow.addNewImportingAsset();";
item[0] = "Add Reference to Existing Asset" TAB "" TAB "ImportAssetWindow.addRefExistingAsset();";
item[1] = "Remove asset" TAB "" TAB "ImportAssetWindow.removeImportingAsset();";
item[1] = "Import Existing File as Asset" TAB "" TAB "ImportAssetWindow.importExistingFile();";
item[2] = "-";
item[3] = "Add Reference to Existing Asset" TAB "" TAB "ImportAssetWindow.addRefExistingAsset();";
item[4] = "-";
item[5] = "Remove asset" TAB "" TAB "ImportAssetWindow.removeImportingAsset();";
};
}
if( !isObject( AddNewToolPopup ) )
{
new PopupMenu( AddNewToolPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
isPopup = true;
item[ 0 ] = "Create New Editor Tool" TAB "" TAB "AssetBrowser.createNewEditorTool(AddNewToolPopup.targetFolder);";
};
AddNewModulePopup.enableItem(1, false);
}
}
function AddNewScriptAssetPopupMenu::onSelectItem(%this, %id, %text)

View file

@ -66,6 +66,8 @@ singleton Material(Grid_512_Grey_Base)
singleton Material(Grid_512_Orange)
{
diffuseMap[0] = "./512_orange.png";
translucent = "1";
translucentBlendOp = "PreMul";
};
singleton Material(Grid_512_Orange_Lines)

View file

@ -1,12 +1,13 @@
function GuiInspectorComponentGroup::buildMaterialField(%this, %component, %fieldName)
function GuiInspectorGroup::buildMaterialField(%this, %fieldName, %fieldLabel, %fieldDesc,
%fieldDefaultVal, %fieldDataVals, %callback, %ownerObj)
{
%extent = 200;
%currentMaterial = %component.getFieldValue(%fieldName);
%currentMaterial = %ownerObj.getFieldValue(%fieldName);
//if we don't have a new material set on this slot, just use the default
if(%currentMaterial $= "" || %currentMaterial == 0)
%currentMaterial = %material;
%currentMaterial = %fieldDefaultVal;
%container = new GuiControl() {
canSaveDynamicFields = "0";
@ -25,7 +26,7 @@ function GuiInspectorComponentGroup::buildMaterialField(%this, %component, %fiel
%labelControl = new GuiTextCtrl() {
canSaveDynamicFields = "0";
Profile = "EditorFontHLBold";
Profile = "ToolsGuiTextBoldProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "16 3";
@ -53,7 +54,7 @@ function GuiInspectorComponentGroup::buildMaterialField(%this, %component, %fiel
position = "7 71";
profile = "ToolsGuiTextCenterProfile";
extent = "64 16";
text = %matName;
text = %currentMaterial;
};
};
@ -96,7 +97,7 @@ function GuiInspectorComponentGroup::buildMaterialField(%this, %component, %fiel
extent = "72 88";
Variable = "";
buttonType = "toggleButton";
tooltip = %matName;
tooltip = %currentMaterial;
groupNum = "0";
text = "";
Object = %component;
@ -111,7 +112,7 @@ function GuiInspectorComponentGroup::buildMaterialField(%this, %component, %fiel
%mapToLabel = new GuiTextCtrl() {
canSaveDynamicFields = "0";
Profile = "EditorFontHLBold";
Profile = "ToolsGuiTextBoldProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "100 26";
@ -130,7 +131,7 @@ function GuiInspectorComponentGroup::buildMaterialField(%this, %component, %fiel
class = "BehaviorEdTextField";
internalName = %accessor @ "File";
canSaveDynamicFields = "0";
Profile = "EditorTextEdit";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "100 50";
@ -262,7 +263,7 @@ function GuiInspectorComponentGroup::buildMaterialField(%this, %component, %fiel
%previewButton.setBitmap(%previewImage);
%previewButton.setText("");
%this.stack.add(%container);
%this-->stack.add(%container);
}
function materialFieldBtn::onClick(%this)

View file

@ -145,19 +145,31 @@ function ConvexEditorMaterialBtn::onClick(%this)
function ConvexEditorMaterialBtn::getMaterialName(%this)
{
materialSelector.showDialog(%this @ ".gotMaterialName", "name");
AssetBrowser.showDialog("MaterialAsset", %this @ ".gotMaterialName", "", "", "");
//materialSelector.showDialog(%this @ ".gotMaterialName", "name");
}
function ConvexEditorMaterialBtn::gotMaterialName(%this, %name)
{
%materialAsset = AssetDatabase.acquireAsset(%name);
//eval(%this.object @ "." @ %this.targetField @ " = " @ %name @ ";");
//%this.object.changeMaterial(getTrailingNumber(%this.targetField), %name);
//%this.object.inspectorApply();
%diffusemap = %name.diffuseMap[0];
%diffusemap = %materialAsset.materialDefinitionName.diffuseMap[0];
if(%diffusemap $= "")
{
%diffuseAsset = %materialAsset.materialDefinitionName.diffuseMapAsset[0];
if(%diffuseAsset !$= "")
{
%diffuseAssetDef = AssetDatabase.acquireAsset(%diffuseAsset);
%diffusemap = %diffuseAssetDef.imageFile;
}
}
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%diffusemap);
ConvexEditorOptionsWindow.activeMaterial = %name;
ConvexEditorOptionsWindow.activeMaterial = %materialAsset.materialDefinitionName;
}
function ConvexEditorMaterialApplyBtn::onClick(%this)
@ -198,19 +210,31 @@ function ConvexEditorDefaultMaterialBtn::onClick(%this)
function ConvexEditorDefaultMaterialBtn::getMaterialName(%this)
{
materialSelector.showDialog(%this @ ".gotMaterialName", "name");
//materialSelector.showDialog(%this @ ".gotMaterialName", "name");
AssetBrowser.showDialog("MaterialAsset", %this @ ".gotMaterialName", "", "", "");
}
function ConvexEditorDefaultMaterialBtn::gotMaterialName(%this, %name)
{
%materialAsset = AssetDatabase.acquireAsset(%name);
//eval(%this.object @ "." @ %this.targetField @ " = " @ %name @ ";");
//%this.object.changeMaterial(getTrailingNumber(%this.targetField), %name);
//%this.object.inspectorApply();
%diffusemap = %name.diffuseMap[0];
%diffusemap = %materialAsset.materialDefinitionName.diffuseMap[0];
if(%diffusemap $= "")
{
%diffuseAsset = %materialAsset.materialDefinitionName.diffuseMapAsset[0];
if(%diffuseAsset !$= "")
{
%diffuseAssetDef = AssetDatabase.acquireAsset(%diffuseAsset);
%diffusemap = %diffuseAssetDef.imageFile;
}
}
ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(%diffusemap);
ConvexEditorOptionsWindow.activeShape.material = %name;
ConvexEditorOptionsWindow.activeShape.material = %materialAsset.materialDefinitionName;
ConvexEditorGui.updateShape();
}

View file

@ -92,7 +92,7 @@ function ConvexEditorPlugin::onWorldEditorStartup( %this )
%this.popupMenu = ConvexActionsMenu;
exec( "./convexEditorSettingsTab.ed.gui" );
ESettingsWindow.addTabPage( EConvexEditorSettingsPage );
//ESettingsWindow.addTabPage( EConvexEditorSettingsPage );
}
function ConvexEditorPlugin::onActivated( %this )

View file

@ -289,7 +289,6 @@ function ESettingsWindow::getAxisSettings(%this)
function ESettingsWindow::getGeneralSettings(%this)
{
SettingsInspector.startGroup("Paths");
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "New Level", "filename", "");
SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Torsion Path", "filename", "");
SettingsInspector.endGroup();
@ -416,6 +415,7 @@ function ESettingsWindow::getGameGeneralSettings(%this)
{
SettingsInspector.startGroup("General");
SettingsInspector.addSettingsField("General/ProjectName", "Project Name", "string", "");
SettingsInspector.addSettingsField("General/LightingMode", "Lighting Mode", "list", "Dictates the lighting mode the project uses", "Deferred,Forward");
SettingsInspector.endGroup();
}

View file

@ -9,4 +9,12 @@ function GuiInspectorVariableGroup::onConstructField(%this, %fieldName, %fieldLa
%makeCommand = %this @ ".build" @ %fieldTypeName @ "Field(\""@ %fieldName @ "\",\"" @ %fieldLabel @ "\",\"" @ %fieldDesc @ "\",\"" @
%fieldDefaultVal @ "\",\"" @ %fieldDataVals @ "\",\"" @ %inspector @ "." @ %callbackName @ "\",\"" @ %ownerObj @"\");";
eval(%makeCommand);
}
}
function GuiInspectorGroup::onConstructField(%this, %fieldName, %fieldLabel, %fieldTypeName, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
{
%inspector = %this.getParent();
%makeCommand = %this @ ".build" @ %fieldTypeName @ "Field(\""@ %fieldName @ "\",\"" @ %fieldLabel @ "\",\"" @ %fieldDesc @ "\",\"" @
%fieldDefaultVal @ "\",\"" @ %fieldDataVals @ "\",\"" @ %inspector @ "." @ %callbackName @ "\",\"" @ %ownerObj @"\");";
eval(%makeCommand);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 928 B

Before After
Before After

View file

@ -5,7 +5,7 @@
minExtent = "8 8";
horizSizing = "width";
vertSizing = "height";
profile = "GuiDefaultProfile";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";

View file

@ -86,6 +86,14 @@ new GuiControlProfile (ToolsGuiSolidDefaultProfile : ToolsGuiDefaultProfile)
category = "Tools";
};
if( !isObject( ToolsGuiDefaultNonModalProfile ) )
new GuiControlProfile (ToolsGuiDefaultNonModalProfile : ToolsGuiDefaultProfile)
{
opaque = false;
modal = false;
category = "Tools";
};
if( !isObject( ToolsGuiTransparentProfile ) )
new GuiControlProfile (ToolsGuiTransparentProfile)
{
@ -192,6 +200,12 @@ new GuiControlProfile (ToolsGuiTextProfile)
category = "Tools";
};
if( !isObject( ToolsGuiTextBoldProfile ) )
new GuiControlProfile (ToolsGuiTextBoldProfile : ToolsGuiTextProfile)
{
fontType = "Noto Sans Bold";
};
if( !isObject( ToolsGuiTextBoldCenterProfile ) )
new GuiControlProfile (ToolsGuiTextBoldCenterProfile : ToolsGuiTextProfile)
{
@ -209,6 +223,13 @@ new GuiControlProfile (ToolsGuiTextRightProfile : ToolsGuiTextProfile)
category = "Tools";
};
if( !isObject( ToolsGuiTextBoldRightProfile ) )
new GuiControlProfile (ToolsGuiTextBoldRightProfile : ToolsGuiTextRightProfile)
{
fontType = "Noto Sans Bold";
fontSize = 16;
};
if( !isObject( ToolsGuiTextCenterProfile ) )
new GuiControlProfile (ToolsGuiTextCenterProfile : ToolsGuiTextProfile)
{

View file

@ -0,0 +1,141 @@
//--- OBJECT WRITE BEGIN ---
new Scene(EditorTemplateLevel) {
canSave = "1";
canSaveDynamicFields = "1";
isSubScene = "0";
isEditing = "0";
isDirty = "0";
cdTrack = "2";
CTF_scoreLimit = "5";
Enabled = "1";
musicTrack = "lush";
new LevelInfo(theLevelInfo) {
nearClip = "0.1";
visibleDistance = "1000";
visibleGhostDistance = "0";
decalBias = "0.0015";
fogColor = "0.6 0.6 0.7 1";
fogDensity = "0";
fogDensityOffset = "700";
fogAtmosphereHeight = "0";
canvasClearColor = "0 0 0 255";
ambientLightBlendPhase = "1";
ambientLightBlendCurve = "0 0 -1 -1";
soundAmbience = "AudioAmbienceDefault";
soundDistanceModel = "Linear";
canSave = "1";
canSaveDynamicFields = "1";
advancedLightmapSupport = "0";
desc0 = "A blank room template that acts as a starting point.";
Enabled = "1";
LevelName = "Blank Room Template";
};
new SkyBox(theSky) {
Material = "BlankSkyMat";
drawBottom = "0";
fogBandHeight = "0";
dirtyGameObject = "0";
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
canSave = "1";
canSaveDynamicFields = "1";
};
new Sun(theSun) {
azimuth = "230.396";
elevation = "45";
color = "0.968628 0.901961 0.901961 1";
ambient = "0.337255 0.533333 0.619608 1";
brightness = "1";
castShadows = "1";
staticRefreshFreq = "250";
dynamicRefreshFreq = "8";
coronaEnabled = "1";
coronaScale = "0.5";
coronaTint = "1 1 1 1";
coronaUseLightColor = "1";
flareScale = "1";
attenuationRatio = "0 1 1";
shadowType = "PSSM";
texSize = "2048";
overDarkFactor = "3000 1500 750 250";
shadowDistance = "200";
shadowSoftness = "0.25";
numSplits = "4";
logWeight = "0.9";
fadeStartDistance = "0";
lastSplitTerrainOnly = "0";
representedInLightmap = "0";
shadowDarkenColor = "0 0 0 -1";
includeLightmappedGeometryInShadow = "0";
dirtyGameObject = "0";
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
canSave = "1";
canSaveDynamicFields = "1";
bias = "0.1";
Blur = "1";
Enabled = "1";
height = "1024";
lightBleedFactor = "0.8";
minVariance = "0";
pointShadowType = "PointShadowType_Paraboloid";
shadowBox = "-100 -100 -100 100 100 100";
splitFadeDistances = "1 1 1 1";
width = "3072";
};
new GroundPlane() {
squareSize = "128";
scaleU = "25";
scaleV = "25";
Material = "Grid_512_Grey";
dirtyGameObject = "0";
canSave = "1";
canSaveDynamicFields = "1";
Enabled = "1";
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
};
new Skylight() {
Enabled = "1";
ReflectionMode = "Baked Cubemap";
dirtyGameObject = "0";
position = "1.37009 -5.23561 46.5817";
rotation = "1 0 0 0";
canSave = "1";
canSaveDynamicFields = "1";
persistentId = "d5eb3afb-dced-11e9-a423-bb0e346e3870";
reflectionPath = "tools/levels/BlankRoom/probes/";
};
new TSStatic() {
ShapeAsset = "pbr:material_ball";
playAmbient = "1";
meshCulling = "0";
originSort = "0";
overrideColor = "0 0 0 0";
collisionType = "Collision Mesh";
decalType = "Collision Mesh";
allowPlayerStep = "0";
alphaFadeEnable = "0";
alphaFadeStart = "100";
alphaFadeEnd = "150";
alphaFadeInverse = "0";
renderNormals = "0";
forceDetail = "-1";
ignoreZodiacs = "0";
useGradientRange = "0";
gradientRange = "0 180";
invertGradientRange = "0";
dirtyGameObject = "0";
position = "-0.000554562 -0.0734091 1.05277";
rotation = "1 0 0 0";
scale = "1 1 1";
canSave = "1";
canSaveDynamicFields = "1";
materialSlot0 = "base_material_ball";
};
};
//--- OBJECT WRITE END ---

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

@ -0,0 +1,111 @@
//--- OBJECT WRITE BEGIN ---
new Scene(EditorTemplateLevel) {
canSave = "1";
canSaveDynamicFields = "1";
isSubScene = "0";
isEditing = "0";
isDirty = "0";
cdTrack = "2";
CTF_scoreLimit = "5";
Enabled = "1";
musicTrack = "lush";
new LevelInfo(theLevelInfo) {
nearClip = "0.1";
visibleDistance = "1000";
visibleGhostDistance = "0";
decalBias = "0.0015";
fogColor = "0.6 0.6 0.7 1";
fogDensity = "0";
fogDensityOffset = "700";
fogAtmosphereHeight = "0";
canvasClearColor = "0 0 0 255";
ambientLightBlendPhase = "1";
ambientLightBlendCurve = "0 0 -1 -1";
soundAmbience = "AudioAmbienceDefault";
soundDistanceModel = "Linear";
canSave = "1";
canSaveDynamicFields = "1";
advancedLightmapSupport = "0";
desc0 = "A blank room template that acts as a starting point.";
Enabled = "1";
LevelName = "Blank Room Template";
};
new SkyBox(theSky) {
Material = "BlankSkyMat";
drawBottom = "0";
fogBandHeight = "0";
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
canSave = "1";
canSaveDynamicFields = "1";
};
new Sun(theSun) {
azimuth = "230.396";
elevation = "45";
color = "0.968628 0.901961 0.901961 1";
ambient = "0.337255 0.533333 0.619608 1";
brightness = "1";
castShadows = "1";
staticRefreshFreq = "250";
dynamicRefreshFreq = "8";
coronaEnabled = "1";
coronaScale = "0.5";
coronaTint = "1 1 1 1";
coronaUseLightColor = "1";
flareScale = "1";
attenuationRatio = "0 1 1";
shadowType = "PSSM";
texSize = "2048";
overDarkFactor = "3000 1500 750 250";
shadowDistance = "200";
shadowSoftness = "0.25";
numSplits = "4";
logWeight = "0.9";
fadeStartDistance = "0";
lastSplitTerrainOnly = "0";
representedInLightmap = "0";
shadowDarkenColor = "0 0 0 -1";
includeLightmappedGeometryInShadow = "0";
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
canSave = "1";
canSaveDynamicFields = "1";
bias = "0.1";
Blur = "1";
Enabled = "1";
height = "1024";
lightBleedFactor = "0.8";
minVariance = "0";
pointShadowType = "PointShadowType_Paraboloid";
shadowBox = "-100 -100 -100 100 100 100";
splitFadeDistances = "1 1 1 1";
width = "3072";
};
new GroundPlane() {
squareSize = "128";
scaleU = "25";
scaleV = "25";
Material = "Grid_512_Grey";
canSave = "1";
canSaveDynamicFields = "1";
Enabled = "1";
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
};
new Skylight() {
Enabled = "1";
ReflectionMode = "Baked Cubemap";
position = "1.37009 -5.23561 46.5817";
rotation = "1 0 0 0";
canSave = "1";
canSaveDynamicFields = "1";
persistentId = "d5eb3afb-dced-11e9-a423-bb0e346e3870";
reflectionPath = "tools/levels/BlankRoom/probes/";
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,53 @@
$PostFXManager::Settings::ColorCorrectionRamp = "core/postFX/images/null_color_ramp.png";
$PostFXManager::Settings::DOF::BlurCurveFar = "";
$PostFXManager::Settings::DOF::BlurCurveNear = "";
$PostFXManager::Settings::DOF::BlurMax = "";
$PostFXManager::Settings::DOF::BlurMin = "";
$PostFXManager::Settings::DOF::EnableAutoFocus = "";
$PostFXManager::Settings::DOF::EnableDOF = "";
$PostFXManager::Settings::DOF::FocusRangeMax = "";
$PostFXManager::Settings::DOF::FocusRangeMin = "";
$PostFXManager::Settings::EnableDOF = "1";
$PostFXManager::Settings::EnabledSSAO = "1";
$PostFXManager::Settings::EnableHDR = "1";
$PostFXManager::Settings::EnableLightRays = "1";
$PostFXManager::Settings::EnablePostFX = "1";
$PostFXManager::Settings::EnableSSAO = "1";
$PostFXManager::Settings::EnableVignette = "1";
$PostFXManager::Settings::HDR::adaptRate = "2";
$PostFXManager::Settings::HDR::blueShiftColor = "1.05 0.97 1.27";
$PostFXManager::Settings::HDR::brightPassThreshold = "1";
$PostFXManager::Settings::HDR::enableBloom = "1";
$PostFXManager::Settings::HDR::enableBlueShift = "0";
$PostFXManager::Settings::HDR::enableToneMapping = "0.5";
$PostFXManager::Settings::HDR::gaussMean = "0";
$PostFXManager::Settings::HDR::gaussMultiplier = "0.3";
$PostFXManager::Settings::HDR::gaussStdDev = "0.8";
$PostFXManager::Settings::HDR::keyValue = "0.117347";
$PostFXManager::Settings::HDR::minLuminace = "0.0459184";
$PostFXManager::Settings::HDR::whiteCutoff = "1";
$PostFXManager::Settings::LightRays::brightScalar = "0.75";
$PostFXManager::Settings::LightRays::decay = "1.0";
$PostFXManager::Settings::LightRays::density = "0.94";
$PostFXManager::Settings::LightRays::numSamples = "40";
$PostFXManager::Settings::LightRays::weight = "5.65";
$PostFXManager::Settings::SSAO::blurDepthTol = "0.001";
$PostFXManager::Settings::SSAO::blurNormalTol = "0.95";
$PostFXManager::Settings::SSAO::lDepthMax = "2";
$PostFXManager::Settings::SSAO::lDepthMin = "0.2";
$PostFXManager::Settings::SSAO::lDepthPow = "0.2";
$PostFXManager::Settings::SSAO::lNormalPow = "2";
$PostFXManager::Settings::SSAO::lNormalTol = "-0.5";
$PostFXManager::Settings::SSAO::lRadius = "1";
$PostFXManager::Settings::SSAO::lStrength = "10";
$PostFXManager::Settings::SSAO::overallStrength = "2";
$PostFXManager::Settings::SSAO::quality = "0";
$PostFXManager::Settings::SSAO::sDepthMax = "1";
$PostFXManager::Settings::SSAO::sDepthMin = "0.1";
$PostFXManager::Settings::SSAO::sDepthPow = "1";
$PostFXManager::Settings::SSAO::sNormalPow = "1";
$PostFXManager::Settings::SSAO::sNormalTol = "0";
$PostFXManager::Settings::SSAO::sRadius = "0.1";
$PostFXManager::Settings::SSAO::sStrength = "6";
$PostFXManager::Settings::Vignette::VMax = 0.830218;
$PostFXManager::Settings::Vignette::VMin = 0.2;

View file

@ -272,10 +272,7 @@ function fastLoadWorldEdit(%val)
if( !$missionRunning )
{
// Flag saying, when level is chosen, launch it with the editor open.
%defaultLevelFile = EditorSettings.value( "WorldEditor/newLevelFile" );
EditorNewLevel(%defaultLevelFile);
EditorNewLevel("tools/levels/DefaultEditorLevel.mis");
}
else
{

View file

@ -82,7 +82,7 @@ function MeshRoadEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the Editor Settings window
exec( "./meshRoadEditorSettingsTab.gui" );
ESettingsWindow.addTabPage( EMeshRoadEditorSettingsPage );
//ESettingsWindow.addTabPage( EMeshRoadEditorSettingsPage );
}
function MeshRoadEditorPlugin::onActivated( %this )

View file

@ -89,7 +89,7 @@ function NavEditorPlugin::onWorldEditorStartup(%this)
// Add ourselves to the Editor Settings window.
exec("./NavEditorSettingsTab.gui");
ESettingsWindow.addTabPage(ENavEditorSettingsPage);
//ESettingsWindow.addTabPage(ENavEditorSettingsPage);
ENavEditorSettingsPage.init();
// Add items to World Editor Creator

View file

@ -83,7 +83,7 @@ function RiverEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the Editor Settings window
exec( "./RiverEditorSettingsTab.gui" );
ESettingsWindow.addTabPage( ERiverEditorSettingsPage );
//ESettingsWindow.addTabPage( ERiverEditorSettingsPage );
}
function RiverEditorPlugin::onActivated( %this )

View file

@ -82,7 +82,7 @@ function RoadEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the Editor Settings window
exec( "./RoadEditorSettingsTab.gui" );
ESettingsWindow.addTabPage( ERoadEditorSettingsPage );
//ESettingsWindow.addTabPage( ERoadEditorSettingsPage );
}
function RoadEditorPlugin::onActivated( %this )

View file

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

View file

@ -121,7 +121,7 @@ function ShapeEditorPlugin::onWorldEditorStartup(%this)
// Add ourselves to the Editor Settings window
exec( "./gui/ShapeEditorSettingsTab.gui" );
ESettingsWindow.addTabPage( EShapeEditorSettingsPage );
//ESettingsWindow.addTabPage( EShapeEditorSettingsPage );
GuiWindowCtrl::attach(ShapeEdPropWindow, ShapeEdSelectWindow);
ShapeEdAnimWindow.resize( -1, 526, 593, 53 );

View file

@ -200,7 +200,7 @@
canSaveDynamicFields = "1";
class = "ESettingsWindowTextEdit";
editorSettingsRead = "EditorGui.readWorldEditorSettings();";
editorSettingsValue = "WorldEditor/newLevelFile";
editorSettingsValue = "";
editorSettingsWrite = "EditorGui.writeWorldEditorSettings();";
};
};

View file

@ -264,6 +264,8 @@ function EditorGui::init(%this)
%obj = EditorPluginSet.getObject( %i );
%obj.onWorldEditorStartup();
}
callOnModules("onWorldEditorStartup", "Tools");
// With everything loaded, start up the settings window
ESettingsWindow.startup();
@ -610,7 +612,7 @@ function EditorGui::onNewLevelLoaded( %this, %levelName )
{
%this.levelName = %levelName;
%this.setupDefaultCameraSettings();
ECameraSettingsPage.init();
//ECameraSettingsPage.init();
EditorCameraSpeedOptions.setupDefaultState();
new ScriptObject( EditorMissionCleanup )

View file

@ -33,7 +33,6 @@ EditorSettings.setDefaultValue( "displayType", $EditTsCtrl::Display
EditorSettings.setDefaultValue( "orthoFOV", "50" );
EditorSettings.setDefaultValue( "orthoShowGrid", "1" );
EditorSettings.setDefaultValue( "currentEditor", "WorldEditorInspectorPlugin" );
EditorSettings.setDefaultValue( "newLevelFile", "tools/levels/BlankRoom.mis" );
if( isFile( "C:/Program Files/Torsion/Torsion.exe" ) )
EditorSettings.setDefaultValue( "torsionPath", "C:/Program Files/Torsion/Torsion.exe" );

View file

@ -220,7 +220,9 @@ function EditorNewLevel( %file )
}
if( %file $= "" )
%file = EditorSettings.value( "WorldEditor/newLevelFile" );
{
%file = "tools/levels/DefaultEditorLevel.mis";
}
if( !$missionRunning )
{
@ -235,6 +237,33 @@ function EditorNewLevel( %file )
EditorGui.saveAs = true;
}
function EditorSaveAsDefaultLevel()
{
MessageBoxYesNo("Save as Default?", "This will save the currently active root scene as the default level the editor loads when it is opened. Continue?",
"doEditorSaveAsDefaultLevel();", "");
}
function doEditorSaveAsDefaultLevel()
{
%success = getScene(0).save("tools/levels/DefaultEditorLevel.mis");
}
function EditorResetDefaultLevel()
{
MessageBoxYesNo("Reset Default?", "This will reset the default level for the editor back to the original. Continue?",
"doEditorResetDefaultLevel();", "");
}
function doEditorResetDefaultLevel()
{
%templatePath = makeFullPath("tools/levels/EditorTemplateLevel.mis");
%defaultPath = makeFullPath("tools/levels/DefaultEditorLevel.mis");
%fileCopy = -1;
if(isFile(%templatePath) && isFile(%defaultPath))
%fileCopy = pathCopy(%templatePath, %defaultPath, false);
}
function EditorSaveMissionMenu()
{
if(EditorGui.saveAs)

View file

@ -141,6 +141,9 @@ function EditorGui::buildMenus(%this)
%fileMenu.appendItem("Save Level" TAB %cmdCtrl SPC "S" TAB "EditorSaveMissionMenu();");
%fileMenu.appendItem("Save Level As..." TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"LevelAsset\", AssetBrowser.selectedModule, \"EditorSaveMissionAs\");");
%fileMenu.appendItem("-");
%fileMenu.appendItem("Save Current Scene as Editor Default" TAB "" TAB "EditorSaveAsDefaultLevel();");
%fileMenu.appendItem("Reset Editor Default" TAB "" TAB "EditorResetDefaultLevel();");
%fileMenu.appendItem("-");
if( $platform $= "windows" )
{

View file

@ -135,7 +135,7 @@ function toggleDebugVizMode( %mode )
}
else
{
if($Viz_SurfacePropertiesModeVar != "" && $Viz_SurfacePropertiesModeVar != -1)
if($Viz_SurfacePropertiesModeVar !$= "" && $Viz_SurfacePropertiesModeVar != -1)
Viz_SurfacePropertiesPFX.enable();
}

View file

@ -105,8 +105,8 @@ function setupEditorVisibilityMenu()
item[ 6 ] = "Show Texel Density" TAB "" TAB "toggleTexelDensityViz();";
};
%probespopup.enableItem(5, false);
%probespopup.enableItem(6, false);
%debugRenderpopup.enableItem(5, false);
%debugRenderpopup.enableItem(6, false);
//
//Lighting stuff