瀏覽代碼

Removed unneeded deletion of asset definition in various asset deconstructors - was causing crash on shutdown when a new asset was made
Added ability to check if popup menu is currently Visible
Removed unwanted path debug/testing code from tsShapeConstructor
Made a number of default postFX's names more consistent and set up asset definitions for them. Began adding hooks to PostFX editor as well
Refactored Asset Import window with new layout, revamped import behavior to work with new layout concept and easier editing of import 'session'
Updated Asset Browser to utilize a common 'DirectoryHandler' object to standardize/centralize all folder navigation behavior for the asset tool ecosystem
Added new window to select path for assets
Refactored import config editor to be easier to utilize
Added field in editor settings to edit import configs without needing to first try and import assets
Updated a number of asset types' scripts to handle address-based system
Began standardizing a number of 'actions' for the asset browser, including drag-n-drop, renaming, deleting, moving, etc.
Made refreshing behavior of AB more consistent
When making new in AB folder, it will automatically navigate to the new folder
When making a new folder, prompts the folder name via new popup window
Refactored PostFX editor to use newer layout with side list for easier use

Areloch 5 年之前
父節點
當前提交
b1e3706dd6
共有 69 個文件被更改,包括 2565 次插入1316 次删除
  1. 0 4
      Engine/source/T3D/assets/ComponentAsset.cpp
  2. 0 4
      Engine/source/T3D/assets/CppAsset.cpp
  3. 0 4
      Engine/source/T3D/assets/CubemapAsset.cpp
  4. 1 5
      Engine/source/T3D/assets/ExampleAsset.cpp
  5. 0 4
      Engine/source/T3D/assets/GUIAsset.cpp
  6. 0 4
      Engine/source/T3D/assets/GameObjectAsset.cpp
  7. 0 4
      Engine/source/T3D/assets/LevelAsset.cpp
  8. 1 5
      Engine/source/T3D/assets/ParticleAsset.cpp
  9. 0 4
      Engine/source/T3D/assets/PostEffectAsset.cpp
  10. 0 4
      Engine/source/T3D/assets/ScriptAsset.cpp
  11. 0 4
      Engine/source/T3D/assets/SoundAsset.cpp
  12. 1 5
      Engine/source/T3D/assets/stateMachineAsset.cpp
  13. 6 1
      Engine/source/gui/editor/popupMenu.cpp
  14. 0 6
      Engine/source/ts/tsShapeConstruct.cpp
  15. 2 2
      Templates/BaseGame/game/core/gui/scripts/canvas.cs
  16. 6 0
      Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.asset.taml
  17. 1 1
      Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.cs
  18. 6 0
      Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.asset.taml
  19. 1 1
      Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.cs
  20. 6 0
      Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.asset.taml
  21. 0 0
      Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.cs
  22. 6 0
      Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.asset.taml
  23. 0 0
      Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.cs
  24. 6 0
      Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.asset.taml
  25. 1 1
      Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.cs
  26. 6 0
      Templates/BaseGame/game/core/postFX/scripts/fogPostFX.asset.taml
  27. 67 0
      Templates/BaseGame/game/core/postFX/scripts/fogPostFX.cs
  28. 8 0
      Templates/BaseGame/game/core/postFX/scripts/lightRays.asset.taml
  29. 0 0
      Templates/BaseGame/game/core/postFX/scripts/lightRays.cs
  30. 6 0
      Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.asset.taml
  31. 0 0
      Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.cs
  32. 6 0
      Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.asset.taml
  33. 5 52
      Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.cs
  34. 44 2
      Templates/BaseGame/game/core/postFX/scripts/vignette.cs
  35. 6 0
      Templates/BaseGame/game/core/postFX/scripts/vignettePostFX.asset.taml
  36. 二進制
      Templates/BaseGame/game/tools/assetBrowser/art/folderIcon.png
  37. 107 34
      Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml
  38. 429 0
      Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui
  39. 0 6
      Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui
  40. 345 372
      Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui
  41. 118 0
      Templates/BaseGame/game/tools/assetBrowser/guis/newFolder.gui
  42. 257 0
      Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui
  43. 20 0
      Templates/BaseGame/game/tools/assetBrowser/main.cs
  44. 99 475
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs
  45. 188 199
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs
  46. 203 0
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.cs
  47. 7 5
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.cs
  48. 44 2
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.cs
  49. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs
  50. 2 2
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs
  51. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.cs
  52. 4 4
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs
  53. 1 8
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.cs
  54. 30 3
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs
  55. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs
  56. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs
  57. 207 0
      Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.cs
  58. 17 15
      Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs
  59. 3 4
      Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs
  60. 13 0
      Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs
  61. 47 0
      Templates/BaseGame/game/tools/assetBrowser/scripts/selectPath.cs
  62. 二進制
      Templates/BaseGame/game/tools/classIcons/material.png
  63. 2 0
      Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs
  64. 46 0
      Templates/BaseGame/game/tools/gui/fieldTypes/buttonField.cs
  65. 1 0
      Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs
  66. 二進制
      Templates/BaseGame/game/tools/gui/images/window.png
  67. 17 14
      Templates/BaseGame/game/tools/gui/postFxEditor.cs
  68. 161 51
      Templates/BaseGame/game/tools/gui/postFxEditor.gui
  69. 1 1
      Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs

+ 0 - 4
Engine/source/T3D/assets/ComponentAsset.cpp

@@ -105,10 +105,6 @@ ComponentAsset::ComponentAsset()
 
 
 ComponentAsset::~ComponentAsset()
 ComponentAsset::~ComponentAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 0 - 4
Engine/source/T3D/assets/CppAsset.cpp

@@ -99,10 +99,6 @@ CppAsset::CppAsset() : AssetBase()
 
 
 CppAsset::~CppAsset()
 CppAsset::~CppAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 0 - 4
Engine/source/T3D/assets/CubemapAsset.cpp

@@ -105,10 +105,6 @@ CubemapAsset::CubemapAsset()
 
 
 CubemapAsset::~CubemapAsset()
 CubemapAsset::~CubemapAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 1 - 5
Engine/source/T3D/assets/ExampleAsset.cpp

@@ -98,10 +98,6 @@ ExampleAsset::ExampleAsset()
 
 
 ExampleAsset::~ExampleAsset()
 ExampleAsset::~ExampleAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
@@ -119,4 +115,4 @@ void ExampleAsset::copyTo(SimObject* object)
 {
 {
    // Call to parent.
    // Call to parent.
    Parent::copyTo(object);
    Parent::copyTo(object);
-}
+}

+ 0 - 4
Engine/source/T3D/assets/GUIAsset.cpp

@@ -92,10 +92,6 @@ GUIAsset::GUIAsset()
 
 
 GUIAsset::~GUIAsset()
 GUIAsset::~GUIAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 0 - 4
Engine/source/T3D/assets/GameObjectAsset.cpp

@@ -103,10 +103,6 @@ GameObjectAsset::GameObjectAsset()
 
 
 GameObjectAsset::~GameObjectAsset()
 GameObjectAsset::~GameObjectAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 0 - 4
Engine/source/T3D/assets/LevelAsset.cpp

@@ -103,10 +103,6 @@ LevelAsset::LevelAsset() : AssetBase(), mIsSubLevel(false)
 
 
 LevelAsset::~LevelAsset()
 LevelAsset::~LevelAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 1 - 5
Engine/source/T3D/assets/ParticleAsset.cpp

@@ -100,10 +100,6 @@ ParticleAsset::ParticleAsset()
 
 
 ParticleAsset::~ParticleAsset()
 ParticleAsset::~ParticleAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
@@ -202,4 +198,4 @@ bool GuiInspectorTypeParticleAssetPtr::updateRects()
    }
    }
 
 
    return resized;
    return resized;
-}
+}

+ 0 - 4
Engine/source/T3D/assets/PostEffectAsset.cpp

@@ -99,10 +99,6 @@ PostEffectAsset::PostEffectAsset()
 
 
 PostEffectAsset::~PostEffectAsset()
 PostEffectAsset::~PostEffectAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 0 - 4
Engine/source/T3D/assets/ScriptAsset.cpp

@@ -98,10 +98,6 @@ ScriptAsset::ScriptAsset() : AssetBase(), mIsServerSide(true)
 
 
 ScriptAsset::~ScriptAsset()
 ScriptAsset::~ScriptAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 0 - 4
Engine/source/T3D/assets/SoundAsset.cpp

@@ -104,10 +104,6 @@ SoundAsset::SoundAsset()
 
 
 SoundAsset::~SoundAsset()
 SoundAsset::~SoundAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 1 - 5
Engine/source/T3D/assets/stateMachineAsset.cpp

@@ -99,10 +99,6 @@ StateMachineAsset::StateMachineAsset()
 
 
 StateMachineAsset::~StateMachineAsset()
 StateMachineAsset::~StateMachineAsset()
 {
 {
-   // If the asset manager does not own the asset then we own the
-   // asset definition so delete it.
-   if (!getOwned())
-      delete mpAssetDefinition;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
@@ -225,4 +221,4 @@ bool GuiInspectorTypeStateMachineAssetPtr::updateRects()
    }
    }
 
 
    return resized;
    return resized;
-}
+}

+ 6 - 1
Engine/source/gui/editor/popupMenu.cpp

@@ -51,7 +51,7 @@ PopupMenu::PopupMenu()
 
 
 	mBarTitle = StringTable->EmptyString();
 	mBarTitle = StringTable->EmptyString();
 	mBounds = RectI(0, 0, 64, 64);
 	mBounds = RectI(0, 0, 64, 64);
-	mVisible = true;
+	mVisible = false;
 
 
 	mBitmapIndex = -1;
 	mBitmapIndex = -1;
 	mDrawBitmapOnly = false;
 	mDrawBitmapOnly = false;
@@ -86,6 +86,7 @@ void PopupMenu::initPersistFields()
 
 
    addField("barTitle", TypeCaseString, Offset(mBarTitle, PopupMenu), "");
    addField("barTitle", TypeCaseString, Offset(mBarTitle, PopupMenu), "");
    addField("radioSelection", TypeBool, Offset(mRadioSelection, PopupMenu), "");
    addField("radioSelection", TypeBool, Offset(mRadioSelection, PopupMenu), "");
+   addField("visible", TypeBool, Offset(mVisible, PopupMenu), "");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
@@ -439,6 +440,8 @@ void PopupMenu::showPopup(GuiCanvas *owner, S32 x /* = -1 */, S32 y /* = -1 */)
 
 
 
 
    mTextList->setHidden(false);
    mTextList->setHidden(false);
+
+   mVisible = true;
 }
 }
 
 
 void PopupMenu::hidePopup()
 void PopupMenu::hidePopup()
@@ -449,6 +452,8 @@ void PopupMenu::hidePopup()
    }
    }
 
 
    hidePopupSubmenus();
    hidePopupSubmenus();
+
+   mVisible = false;
 }
 }
 
 
 void PopupMenu::hidePopupSubmenus()
 void PopupMenu::hidePopupSubmenus()

+ 0 - 6
Engine/source/ts/tsShapeConstruct.cpp

@@ -402,12 +402,6 @@ bool TSShapeConstructor::onAdd()
    if ( !Parent::onAdd() )
    if ( !Parent::onAdd() )
       return false;
       return false;
 
 
-   static const U32 bufSize = 512;
-   char* buf = Con::getReturnBuffer(bufSize);
-   Platform::makeFullPathName(mShapePath, buf, bufSize, NULL);
-
-   mShapePath = buf;
-
    // Prevent multiple objects pointing at the same shape file
    // Prevent multiple objects pointing at the same shape file
    TSShapeConstructor* tss = findShapeConstructor( mShapePath );
    TSShapeConstructor* tss = findShapeConstructor( mShapePath );
    if ( tss )
    if ( tss )

+ 2 - 2
Templates/BaseGame/game/core/gui/scripts/canvas.cs

@@ -157,6 +157,6 @@ function configureCanvas()
    // We need to parse the setting between AA modes, and then it's level
    // We need to parse the setting between AA modes, and then it's level
    // It's formatted as AATypexAALevel
    // It's formatted as AATypexAALevel
    // So, FXAAx4 or MLAAx2
    // So, FXAAx4 or MLAAx2
-   if ( isObject( FXAA_PostEffect ) )
-      FXAA_PostEffect.isEnabled = ( %aa > 0 ) ? true : false;
+   if ( isObject( FXAAPostFX ) )
+      FXAAPostFX.isEnabled = ( %aa > 0 ) ? true : false;
 }
 }

+ 6 - 0
Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.asset.taml

@@ -0,0 +1,6 @@
+<PostEffectAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="FXAAPostFX"
+    scriptFile="@assetFile=FXAAPostFX.cs"
+    VersionId="1" />

+ 1 - 1
Templates/BaseGame/game/core/postFX/scripts/fxaa.cs → Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.cs

@@ -47,7 +47,7 @@ singleton ShaderData( FXAA_ShaderData )
    pixVersion = 3.0;
    pixVersion = 3.0;
 };
 };
 
 
-singleton PostEffect( FXAA_PostEffect )
+singleton PostEffect( FXAAPostFX )
 {
 {
    isEnabled = false;
    isEnabled = false;
    
    

+ 6 - 0
Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.asset.taml

@@ -0,0 +1,6 @@
+<PostEffectAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="GlowPostFX"
+    scriptFile="@assetFile=GlowPostFX.cs"
+    VersionId="1" />

+ 1 - 1
Templates/BaseGame/game/core/postFX/scripts/glow.cs → Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.cs

@@ -60,7 +60,7 @@ singleton GFXStateBlockData( PFX_GlowCombineStateBlock : PFX_DefaultStateBlock )
 };
 };
 
 
 
 
-singleton PostEffect( GlowPostFx )
+singleton PostEffect( GlowPostFX )
 {  
 {  
    // Do not allow the glow effect to work in reflection 
    // Do not allow the glow effect to work in reflection 
    // passes by default so we don't do the extra drawing.
    // passes by default so we don't do the extra drawing.

+ 6 - 0
Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.asset.taml

@@ -0,0 +1,6 @@
+<PostEffectAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="HDRPostFX"
+    scriptFile="@assetFile=HDRPostFX.cs"
+    VersionId="1" />

+ 0 - 0
Templates/BaseGame/game/core/postFX/scripts/hdr.cs → Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.cs


+ 6 - 0
Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.asset.taml

@@ -0,0 +1,6 @@
+<PostEffectAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="SSAOPostFx"
+    scriptFile="@assetFile=SSAOPostFx.cs"
+    VersionId="1" />

+ 0 - 0
Templates/BaseGame/game/core/postFX/scripts/ssao.cs → Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.cs


+ 6 - 0
Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.asset.taml

@@ -0,0 +1,6 @@
+<PostEffectAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="TurbulencePostFX"
+    scriptFile="@assetFile=TurbulencePostFX.cs"
+    VersionId="1" />

+ 1 - 1
Templates/BaseGame/game/core/postFX/scripts/turbulence.cs → Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.cs

@@ -42,7 +42,7 @@ singleton ShaderData( PFX_TurbulenceShader )
    pixVersion = 3.0;
    pixVersion = 3.0;
 };
 };
 
 
-singleton PostEffect( TurbulenceFx )  
+singleton PostEffect( TurbulencePostFX )  
 {  
 {  
    isEnabled = false;    
    isEnabled = false;    
    allowReflectPass = true;  
    allowReflectPass = true;  

+ 6 - 0
Templates/BaseGame/game/core/postFX/scripts/fogPostFX.asset.taml

@@ -0,0 +1,6 @@
+<PostEffectAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="fogPostFX"
+    scriptFile="@assetFile=fogPostFX.cs"
+    VersionId="1" />

+ 67 - 0
Templates/BaseGame/game/core/postFX/scripts/fogPostFX.cs

@@ -0,0 +1,67 @@
+//-----------------------------------------------------------------------------
+// Copyright (c) 2012 GarageGames, LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//-----------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Fog
+//------------------------------------------------------------------------------
+
+singleton ShaderData( FogPassShader )
+{   
+   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
+   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/fogP.hlsl";
+         
+   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
+   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/gl/fogP.glsl";
+            
+   samplerNames[0] = "$deferredTex";
+   
+   pixVersion = 2.0;
+};
+
+
+singleton GFXStateBlockData( FogPassStateBlock : PFX_DefaultStateBlock )
+{   
+   blendDefined = true;
+   blendEnable = true; 
+   blendSrc = GFXBlendSrcAlpha;
+   blendDest = GFXBlendInvSrcAlpha;
+};
+
+
+singleton PostEffect( fogPostFX )
+{   
+   // We forward render the reflection pass
+   // so it does its own fogging.
+   allowReflectPass = false;
+      
+   renderTime = "PFXBeforeBin";
+   renderBin = "ObjTranslucentBin";   
+   
+   shader = FogPassShader;
+   stateBlock = FogPassStateBlock;
+   texture[0] = "#deferred";
+   
+   renderPriority = 5;
+   
+   targetFormat = getBestHDRFormat();
+   isEnabled = true;
+};

+ 8 - 0
Templates/BaseGame/game/core/postFX/scripts/lightRays.asset.taml

@@ -0,0 +1,8 @@
+<PostEffectAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="LightRayPostFX"
+    scriptFile="@assetFile=lightRays.cs"
+    glslShader="NewPostEffectP.glsl"
+    hlslShader="NewPostEffectP.hlsl"
+    VersionId="1" />

+ 0 - 0
Templates/BaseGame/game/core/postFX/scripts/lightRay.cs → Templates/BaseGame/game/core/postFX/scripts/lightRays.cs


+ 6 - 0
Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.asset.taml

@@ -0,0 +1,6 @@
+<PostEffectAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="reflectionProbeArrayPostFX"
+    scriptFile="@assetFile=reflectionProbeArrayPostFX.cs"
+    VersionId="1" />

+ 0 - 0
Templates/BaseGame/game/core/postFX/scripts/pbr.cs → Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.cs


+ 6 - 0
Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.asset.taml

@@ -0,0 +1,6 @@
+<PostEffectAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="underWaterFogPostFX"
+    scriptFile="@assetFile=underWaterFogPostFX.cs"
+    VersionId="1" />

+ 5 - 52
Templates/BaseGame/game/core/postFX/scripts/fog.cs → Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.cs

@@ -20,53 +20,6 @@
 // IN THE SOFTWARE.
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
-//------------------------------------------------------------------------------
-// Fog
-//------------------------------------------------------------------------------
-
-singleton ShaderData( FogPassShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/fogP.hlsl";
-         
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/gl/fogP.glsl";
-            
-   samplerNames[0] = "$deferredTex";
-   
-   pixVersion = 2.0;
-};
-
-
-singleton GFXStateBlockData( FogPassStateBlock : PFX_DefaultStateBlock )
-{   
-   blendDefined = true;
-   blendEnable = true; 
-   blendSrc = GFXBlendSrcAlpha;
-   blendDest = GFXBlendInvSrcAlpha;
-};
-
-
-singleton PostEffect( FogPostFx )
-{   
-   // We forward render the reflection pass
-   // so it does its own fogging.
-   allowReflectPass = false;
-      
-   renderTime = "PFXBeforeBin";
-   renderBin = "ObjTranslucentBin";   
-   
-   shader = FogPassShader;
-   stateBlock = FogPassStateBlock;
-   texture[0] = "#deferred";
-   
-   renderPriority = 5;
-   
-   targetFormat = getBestHDRFormat();
-   isEnabled = true;
-};
-
-
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
 // UnderwaterFog
 // UnderwaterFog
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
@@ -96,7 +49,7 @@ singleton GFXStateBlockData( UnderwaterFogPassStateBlock : PFX_DefaultStateBlock
 };
 };
 
 
 
 
-singleton PostEffect( UnderwaterFogPostFx )
+singleton PostEffect( underWaterFogPostFX )
 {
 {
    oneFrameOnly = true;
    oneFrameOnly = true;
    onThisFrame = false;
    onThisFrame = false;
@@ -120,16 +73,16 @@ singleton PostEffect( UnderwaterFogPostFx )
    isEnabled = true;
    isEnabled = true;
 };
 };
 
 
-function UnderwaterFogPostFx::onEnabled( %this )
+function underWaterFogPostFX::onEnabled( %this )
 {
 {
-   TurbulenceFx.enable();
+   TurbulencePostFX.enable();
    CausticsPFX.enable();
    CausticsPFX.enable();
    return true;
    return true;
 }
 }
 
 
-function UnderwaterFogPostFx::onDisabled( %this )
+function underWaterFogPostFX::onDisabled( %this )
 {
 {
-   TurbulenceFx.disable();
+   TurbulencePostFX.disable();
    CausticsPFX.disable();
    CausticsPFX.disable();
    return false;
    return false;
 }
 }

+ 44 - 2
Templates/BaseGame/game/core/postFX/scripts/vignette.cs

@@ -36,7 +36,12 @@ singleton ShaderData( VignetteShader )
    pixVersion = 2.0;
    pixVersion = 2.0;
 };
 };
 
 
-singleton PostEffect( VignettePostEffect )  
+function vignettePostFX::onAdd( %this )
+{   
+   PostFXManager.registerPostEffect(%this);
+}
+
+singleton PostEffect( vignettePostFX )  
 {  
 {  
    isEnabled         = false;
    isEnabled         = false;
    allowReflectPass  = false;
    allowReflectPass  = false;
@@ -48,8 +53,45 @@ singleton PostEffect( VignettePostEffect )
    renderPriority    = 10;
    renderPriority    = 10;
 };
 };
 
 
-function VignettePostEffect::setShaderConsts(%this)
+function vignettePostFX::setShaderConsts(%this)
 {
 {
    %this.setShaderConst("$Vmax", $VignettePostEffect::VMax);
    %this.setShaderConst("$Vmax", $VignettePostEffect::VMax);
    %this.setShaderConst("$Vmin", $VignettePostEffect::VMin);
    %this.setShaderConst("$Vmin", $VignettePostEffect::VMin);
+}
+
+function vignettePostFX::populatePostFXSettings(%this)
+{
+   PostEffectEditorInspector.startGroup("Vignette - General");
+   PostEffectEditorInspector.addField("$PostFXManager::Settings::EnableVignette", "Enabled", "bool", "", $PostFXManager::PostFX::EnableVignette, "");
+   PostEffectEditorInspector.addField("$PostFXManager::Settings::VignettePostEffect::VMin", "Vignette Min", "float", "", $VignettePostEffect::VMin, "");
+   PostEffectEditorInspector.addField("$PostFXManager::Settings::VignettePostEffect::VMax", "Vignette Max", "float", "", $VignettePostEffect::VMax, "");
+   PostEffectEditorInspector.endGroup();
+}
+
+function vignettePostFX::applyFromPreset(%this)
+{
+   //Light rays settings
+   $PostFXManager::PostFX::EnableLightRays = $PostFXManager::Settings::EnableLightRays;
+   $LightRayPostFX::brightScalar           = $PostFXManager::Settings::LightRays::brightScalar;
+   
+   $LightRayPostFX::numSamples            = $PostFXManager::Settings::LightRays::numSamples;
+   $LightRayPostFX::density               = $PostFXManager::Settings::LightRays::density;
+   $LightRayPostFX::weight                = $PostFXManager::Settings::LightRays::weight;
+   $LightRayPostFX::decay                 = $PostFXManager::Settings::LightRays::decay;
+   
+   if($PostFXManager::PostFX::EnableVignette)
+      %this.enable();
+   else
+      %this.disable();
+}
+
+function vignettePostFX::settingsApply(%this)
+{
+   $PostFXManager::Settings::EnableLightRays                = $PostFXManager::PostFX::EnableLightRays;
+   $PostFXManager::Settings::LightRays::brightScalar        = $LightRayPostFX::brightScalar;
+   
+   $PostFXManager::Settings::LightRays::numSamples          = $LightRayPostFX::numSamples;
+   $PostFXManager::Settings::LightRays::density             = $LightRayPostFX::density;
+   $PostFXManager::Settings::LightRays::weight              = $LightRayPostFX::weight;
+   $PostFXManager::Settings::LightRays::decay               = $LightRayPostFX::decay;
 }
 }

+ 6 - 0
Templates/BaseGame/game/core/postFX/scripts/vignettePostFX.asset.taml

@@ -0,0 +1,6 @@
+<PostEffectAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="vignettePostFX"
+    scriptFile="@assetFile=vignettePostFX.cs"
+    VersionId="1" />

二進制
Templates/BaseGame/game/tools/assetBrowser/art/folderIcon.png


+ 107 - 34
Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml

@@ -1,64 +1,137 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <AssetImportSettings>
 <AssetImportSettings>
-    <Group name="TestConfig">
+    <Group name="NewTest">
+        <Group name="Materials">
+            <Setting name="ImportMaterials">1</Setting>
+            <Setting name="UseExistingMaterials">1</Setting>
+            <Setting name="CreateComposites">1</Setting>
+            <Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
+        </Group>
         <Group name="Meshes">
         <Group name="Meshes">
-            <Setting name="invertNormals">0</Setting>
-            <Setting name="UpAxisOverride">Z_AXIS</Setting>
-            <Setting name="LODType">TrailingNumber</Setting>
-            <Setting name="ScaleOverride">0.01</Setting>
+            <Setting name="DoScaleOverride">0</Setting>
+            <Setting name="limitBoneWeights">0</Setting>
+            <Setting name="convertLeftHanded">0</Setting>
+            <Setting name="ScaleOverride">1</Setting>
+            <Setting name="JoinIdenticalVerts">0</Setting>
             <Setting name="IgnoreNodeScale">0</Setting>
             <Setting name="IgnoreNodeScale">0</Setting>
+            <Setting name="calcTangentSpace">0</Setting>
+            <Setting name="AdjustCenter">0</Setting>
             <Setting name="AdjustFloor">0</Setting>
             <Setting name="AdjustFloor">0</Setting>
             <Setting name="reverseWindingOrder">0</Setting>
             <Setting name="reverseWindingOrder">0</Setting>
-            <Setting name="DoScaleOverride">1</Setting>
-            <Setting name="JoinIdenticalVerts">1</Setting>
-            <Setting name="DoUpAxisOverride">0</Setting>
-            <Setting name="AdjustCenter">0</Setting>
+            <Setting name="removeRedundantMats">0</Setting>
+            <Setting name="ImportMesh">1</Setting>
             <Setting name="CollapseSubmeshes">0</Setting>
             <Setting name="CollapseSubmeshes">0</Setting>
-        </Group>
-        <Group name="Collision">
-            <Setting name="CollisionMeshPrefix">Col</Setting>
-            <Setting name="GenCollisionType">CollisionMesh</Setting>
-            <Setting name="GenerateLOSCollisions">1</Setting>
-            <Setting name="LOSCollisionMeshPrefix">LOS</Setting>
-            <Setting name="GenLOSCollisionType">CollisionMesh</Setting>
-            <Setting name="GenerateCollisions">1</Setting>
+            <Setting name="DoUpAxisOverride">0</Setting>
+            <Setting name="genUVCoords">0</Setting>
+            <Setting name="LODType">TrailingNumber</Setting>
+            <Setting name="invertNormals">0</Setting>
+            <Setting name="TransformUVs">0</Setting>
+            <Setting name="flipUVCoords">0</Setting>
+            <Setting name="UpAxisOverride">Z_AXIS</Setting>
+            <Setting name="findInstances">0</Setting>
         </Group>
         </Group>
         <Group name="Images">
         <Group name="Images">
+            <Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
             <Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
             <Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
-            <Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
-            <Setting name="Compressed">1</Setting>
-            <Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
-            <Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
-            <Setting name="GenerateMaterialOnImport">1</Setting>
-            <Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a,</Setting>
-            <Setting name="IsHDR">0</Setting>
+            <Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
             <Setting name="PopulateMaterialMaps">1</Setting>
             <Setting name="PopulateMaterialMaps">1</Setting>
+            <Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
+            <Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
             <Setting name="ImageType">N/A</Setting>
             <Setting name="ImageType">N/A</Setting>
-            <Setting name="UseMips">1</Setting>
-            <Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
+            <Setting name="Compressed">1</Setting>
             <Setting name="Scaling">1.0</Setting>
             <Setting name="Scaling">1.0</Setting>
-            <Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
             <Setting name="TextureFilteringMode">Bilinear</Setting>
             <Setting name="TextureFilteringMode">Bilinear</Setting>
+            <Setting name="IsHDR">0</Setting>
+            <Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL</Setting>
+            <Setting name="UseMips">1</Setting>
+            <Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
+            <Setting name="GenerateMaterialOnImport">1</Setting>
         </Group>
         </Group>
-        <Group name="Materials">
-            <Setting name="IgnoreMaterials">ColorEffect*,</Setting>
-            <Setting name="UseExistingMaterials">1</Setting>
-            <Setting name="CreateComposites">1</Setting>
-            <Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
-            <Setting name="AlwaysPresentImageMaps">0</Setting>
-            <Setting name="ImportMaterials">1</Setting>
+        <Group name="General">
+            <Setting name="DuplicatAutoResolution">AutoPrune</Setting>
+            <Setting name="AutomaticallyPromptMissingFiles">0</Setting>
+            <Setting name="WarningsAsErrors">0</Setting>
+            <Setting name="PreventImportWithErrors">1</Setting>
+        </Group>
+        <Group name="Collision">
+            <Setting name="CollisionMeshPrefix">Col</Setting>
+            <Setting name="LOSCollisionMeshPrefix">LOS</Setting>
+            <Setting name="GenerateLOSCollisions">1</Setting>
+            <Setting name="GenerateCollisions">1</Setting>
+            <Setting name="GenCollisionType">CollisionMesh</Setting>
+            <Setting name="GenLOSCollisionType">CollisionMesh</Setting>
         </Group>
         </Group>
         <Group name="Animations">
         <Group name="Animations">
             <Setting name="ImportAnimations">1</Setting>
             <Setting name="ImportAnimations">1</Setting>
+            <Setting name="animTiming">Seconds</Setting>
+            <Setting name="animFPS">2</Setting>
             <Setting name="SeparateAnimations">1</Setting>
             <Setting name="SeparateAnimations">1</Setting>
         </Group>
         </Group>
         <Group name="Sounds">
         <Group name="Sounds">
             <Setting name="VolumeAdjust">1.0</Setting>
             <Setting name="VolumeAdjust">1.0</Setting>
+            <Setting name="PitchAdjust">1.0</Setting>
+            <Setting name="Compressed">0</Setting>
+        </Group>
+    </Group>
+    <Group name="TestConfig">
+        <Group name="Images">
+            <Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
+            <Setting name="IsHDR">0</Setting>
+            <Setting name="TextureFilteringMode">Bilinear</Setting>
+            <Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
+            <Setting name="Compressed">1</Setting>
+            <Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a,</Setting>
+            <Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
+            <Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
+            <Setting name="Scaling">1.0</Setting>
+            <Setting name="PopulateMaterialMaps">1</Setting>
+            <Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
+            <Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
+            <Setting name="UseMips">1</Setting>
+            <Setting name="ImageType">N/A</Setting>
+            <Setting name="GenerateMaterialOnImport">1</Setting>
+        </Group>
+        <Group name="Collision">
+            <Setting name="GenLOSCollisionType">CollisionMesh</Setting>
+            <Setting name="LOSCollisionMeshPrefix">LOS</Setting>
+            <Setting name="CollisionMeshPrefix">Col</Setting>
+            <Setting name="GenCollisionType">CollisionMesh</Setting>
+            <Setting name="GenerateLOSCollisions">1</Setting>
+            <Setting name="GenerateCollisions">1</Setting>
+        </Group>
+        <Group name="Sounds">
             <Setting name="Compressed">0</Setting>
             <Setting name="Compressed">0</Setting>
             <Setting name="PitchAdjust">1.0</Setting>
             <Setting name="PitchAdjust">1.0</Setting>
+            <Setting name="VolumeAdjust">1.0</Setting>
         </Group>
         </Group>
         <Group name="General">
         <Group name="General">
             <Setting name="DuplicatAutoResolution">AutoPrune</Setting>
             <Setting name="DuplicatAutoResolution">AutoPrune</Setting>
         </Group>
         </Group>
+        <Group name="Meshes">
+            <Setting name="JoinIdenticalVerts">1</Setting>
+            <Setting name="reverseWindingOrder">0</Setting>
+            <Setting name="DoUpAxisOverride">0</Setting>
+            <Setting name="IgnoreNodeScale">0</Setting>
+            <Setting name="AdjustCenter">0</Setting>
+            <Setting name="DoScaleOverride">1</Setting>
+            <Setting name="LODType">TrailingNumber</Setting>
+            <Setting name="AdjustFloor">0</Setting>
+            <Setting name="UpAxisOverride">Z_AXIS</Setting>
+            <Setting name="CollapseSubmeshes">0</Setting>
+            <Setting name="ScaleOverride">0.01</Setting>
+            <Setting name="invertNormals">0</Setting>
+        </Group>
+        <Group name="Materials">
+            <Setting name="IgnoreMaterials">ColorEffect*,</Setting>
+            <Setting name="UseExistingMaterials">1</Setting>
+            <Setting name="ImportMaterials">1</Setting>
+            <Setting name="CreateComposites">1</Setting>
+            <Setting name="AlwaysPresentImageMaps">0</Setting>
+            <Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
+        </Group>
+        <Group name="Animations">
+            <Setting name="SeparateAnimations">1</Setting>
+            <Setting name="ImportAnimations">1</Setting>
+        </Group>
     </Group>
     </Group>
 </AssetImportSettings>
 </AssetImportSettings>

+ 429 - 0
Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui

@@ -0,0 +1,429 @@
+//--- OBJECT WRITE BEGIN ---
+%guiContent = new GuiControl(AssetImportConfigEditor) {
+   position = "0 0";
+   extent = "1024 768";
+   minExtent = "8 2";
+   horizSizing = "right";
+   vertSizing = "bottom";
+   profile = "GuiDefaultProfile";
+   visible = "1";
+   active = "1";
+   tooltipProfile = "GuiToolTipProfile";
+   hovertime = "1000";
+   isContainer = "1";
+   canSave = "1";
+   canSaveDynamicFields = "1";
+
+   new GuiWindowCtrl(ImportAssetNewConfigEditorWindow) {
+      text = "Import Options Config";
+      resizeWidth = "1";
+      resizeHeight = "1";
+      canMove = "1";
+      canClose = "1";
+      canMinimize = "0";
+      canMaximize = "0";
+      canCollapse = "0";
+      edgeSnap = "1";
+      margin = "0 0 0 0";
+      padding = "0 0 0 0";
+      anchorTop = "1";
+      anchorBottom = "0";
+      anchorLeft = "1";
+      anchorRight = "0";
+      position = "324 349";
+      extent = "376 70";
+      minExtent = "48 70";
+      horizSizing = "center";
+      vertSizing = "center";
+      profile = "ToolsGuiWindowProfile";
+      visible = "0";
+      active = "1";
+      tooltipProfile = "ToolsGuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "1";
+      hidden = "1";
+      canSave = "1";
+      canSaveDynamicFields = "0";
+
+      new GuiTextCtrl() {
+         text = "Configuration Name:";
+         maxLength = "1024";
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "10 26";
+         extent = "100 17";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "ToolsGuiTextProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiTextEditCtrl(AssetImportNewConfigName) {
+         historySize = "0";
+         tabComplete = "0";
+         sinkAllKeyEvents = "0";
+         password = "0";
+         passwordMask = "*";
+         maxLength = "1024";
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "113 25";
+         extent = "250 18";
+         minExtent = "8 2";
+         horizSizing = "width";
+         vertSizing = "bottom";
+         profile = "ToolsGuiTextEditProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiButtonCtrl() {
+         text = "Done";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "301 45";
+         extent = "64 22";
+         minExtent = "8 2";
+         horizSizing = "left";
+         vertSizing = "top";
+         profile = "ToolsGuiButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "AssetImportConfigEditor.createNewImportConfig();";
+         tooltipProfile = "ToolsGuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+   };
+   new GuiWindowCtrl() {
+      text = "Asset Import Config Editor";
+      resizeWidth = "1";
+      resizeHeight = "1";
+      canMove = "1";
+      canClose = "1";
+      canMinimize = "0";
+      canMaximize = "0";
+      canCollapse = "0";
+      closeCommand = "Canvas.popDialog(AssetImportConfigEditor);";
+      edgeSnap = "0";
+      margin = "0 0 0 0";
+      padding = "0 0 0 0";
+      anchorTop = "1";
+      anchorBottom = "0";
+      anchorLeft = "1";
+      anchorRight = "0";
+      position = "191 76";
+      extent = "642 615";
+      minExtent = "8 8";
+      horizSizing = "center";
+      vertSizing = "center";
+      profile = "ToolsGuiWindowProfile";
+      visible = "1";
+      active = "1";
+      tooltipProfile = "GuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "1";
+      canSave = "1";
+      canSaveDynamicFields = "0";
+
+      new GuiSplitContainer() {
+         orientation = "Vertical";
+         splitterSize = "2";
+         splitPoint = "182 100";
+         fixedPanel = "None";
+         fixedSize = "100";
+         docking = "None";
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "0 24";
+         extent = "642 562";
+         minExtent = "64 64";
+         horizSizing = "width";
+         vertSizing = "height";
+         profile = "ToolsGuiSolidDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+
+         new GuiPanel() {
+            docking = "Client";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "0 0";
+            extent = "180 562";
+            minExtent = "16 16";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "ToolsGuiSolidDefaultProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            internalName = "Panel1";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+
+            new GuiBitmapButtonCtrl() {
+               bitmap = "tools/gui/images/iconAdd.png";
+               bitmapMode = "Centered";
+               autoFitExtents = "0";
+               useModifiers = "0";
+               useStates = "1";
+               masked = "0";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               position = "145 4";
+               extent = "16 16";
+               minExtent = "8 2";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "GuiDefaultProfile";
+               visible = "1";
+               active = "1";
+               command = "AssetImportConfigEditor.addNewConfig();";
+               tooltipProfile = "GuiToolTipProfile";
+               tooltip = "Add a new Import Config";
+               hovertime = "1000";
+               isContainer = "0";
+               internalName = "newImportConfig";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+            new GuiBitmapButtonCtrl() {
+               bitmap = "tools/gui/images/iconDelete.png";
+               bitmapMode = "Centered";
+               autoFitExtents = "0";
+               useModifiers = "0";
+               useStates = "1";
+               masked = "0";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               position = "163 4";
+               extent = "16 16";
+               minExtent = "8 2";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "GuiDefaultProfile";
+               visible = "1";
+               active = "1";
+               command = "AssetImportConfigEditor.deleteConfig();";
+               tooltipProfile = "GuiToolTipProfile";
+               tooltip = "Delets the currently selected import config";
+               hovertime = "1000";
+               isContainer = "0";
+               internalName = "deleteImportConfig";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+            new GuiScrollCtrl() {
+               willFirstRespond = "1";
+               hScrollBar = "alwaysOff";
+               vScrollBar = "dynamic";
+               lockHorizScroll = "0";
+               lockVertScroll = "0";
+               constantThumbHeight = "0";
+               childMargin = "0 0";
+               mouseWheelScrollSpeed = "-1";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "3 24";
+               extent = "177 538";
+               minExtent = "100 50";
+               horizSizing = "width";
+               vertSizing = "height";
+               profile = "ToolsGuiScrollProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+
+               new GuiTextListCtrl(AssetImportConfigList) {
+                  columns = "0";
+                  fitParentWidth = "0";
+                  clipColumnText = "0";
+                  rowHeightPadding = "2";
+                  position = "1 1";
+                  extent = "60 32";
+                  minExtent = "8 2";
+                  horizSizing = "width";
+                  vertSizing = "height";
+                  profile = "ToolsGuiListBoxProfile";
+                  visible = "1";
+                  active = "1";
+                  tooltipProfile = "ToolsGuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "0";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+            };
+         };
+         new GuiPanel() {
+            docking = "Client";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "184 0";
+            extent = "458 562";
+            minExtent = "16 16";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "ToolsGuiSolidDefaultProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            internalName = "panel2";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+
+            new GuiScrollCtrl() {
+               willFirstRespond = "1";
+               hScrollBar = "dynamic";
+               vScrollBar = "dynamic";
+               lockHorizScroll = "0";
+               lockVertScroll = "0";
+               constantThumbHeight = "0";
+               childMargin = "0 0";
+               mouseWheelScrollSpeed = "-1";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "0 0";
+               extent = "458 562";
+               minExtent = "8 2";
+               horizSizing = "width";
+               vertSizing = "height";
+               profile = "ToolsGuiScrollProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "GuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+
+               new GuiVariableInspector(AssetImportConfigEditorInspector) {
+                  dividerMargin = "5";
+                  showCustomFields = "1";
+                  stackingType = "Vertical";
+                  horizStacking = "Left to Right";
+                  vertStacking = "Top to Bottom";
+                  padding = "1";
+                  dynamicSize = "1";
+                  dynamicNonStackExtent = "0";
+                  dynamicPos = "0";
+                  changeChildSizeToFit = "1";
+                  changeChildPosition = "1";
+                  position = "1 1";
+                  extent = "441 615";
+                  minExtent = "16 16";
+                  horizSizing = "width";
+                  vertSizing = "height";
+                  profile = "GuiDefaultProfile";
+                  visible = "1";
+                  active = "1";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "1";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+            };
+         };
+      };
+      new GuiButtonCtrl() {
+         text = "Apply";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "451 588";
+         extent = "93 23";
+         minExtent = "8 8";
+         horizSizing = "right";
+         vertSizing = "top";
+         profile = "ToolsGuiButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "AssetImportConfigEditor.apply(); Canvas.popDialog(AssetImportConfigEditor);";
+         tooltipProfile = "GuiToolTipProfile";
+         tooltip = "Apply the settings and close this dialog";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiButtonCtrl() {
+         text = "Cancel";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "547 588";
+         extent = "93 23";
+         minExtent = "8 8";
+         horizSizing = "right";
+         vertSizing = "top";
+         profile = "ToolsGuiButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "Canvas.popDialog(AssetImprotConfigEditor);";
+         tooltipProfile = "GuiToolTipProfile";
+         tooltip = "Apply the settings and close this dialog";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+   };
+};
+//--- OBJECT WRITE END ---

+ 0 - 6
Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui

@@ -20,18 +20,12 @@
       coreModulesFilter = "0";
       coreModulesFilter = "0";
       currentPreviewPage = "0";
       currentPreviewPage = "0";
       Enabled = "1";
       Enabled = "1";
-      importAssetFinalListArray = "20689";
-      ImportAssetResolutionsPopup = "18119";
-      importAssetUnprocessedListArray = "20688";
-      importingFilesArray = "20687";
-      isReImportingAsset = "0";
       navigationHistoryIdx = "0";
       navigationHistoryIdx = "0";
       onlyShowModulesWithAssets = "0";
       onlyShowModulesWithAssets = "0";
       previewData = "19953";
       previewData = "19953";
       previewSize = "80";
       previewSize = "80";
       templateFilesPath = "tools/assetBrowser/scripts/templateFiles/";
       templateFilesPath = "tools/assetBrowser/scripts/templateFiles/";
       totalPages = "1";
       totalPages = "1";
-      treeFilterMode = "list";
 
 
    new GuiWindowCtrl(AssetBrowser_addFilterWindow) {
    new GuiWindowCtrl(AssetBrowser_addFilterWindow) {
       text = "Create New Tag";
       text = "Create New Tag";

+ 345 - 372
Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui

@@ -14,8 +14,8 @@
    canSave = "1";
    canSave = "1";
    canSaveDynamicFields = "1";
    canSaveDynamicFields = "1";
 
 
-   new GuiWindowCtrl(ImportAssetOptionsWindow) {
-      text = "Import Options";
+   new GuiWindowCtrl(ImportAssetWindow) {
+      text = "Import Assets";
       resizeWidth = "1";
       resizeWidth = "1";
       resizeHeight = "1";
       resizeHeight = "1";
       canMove = "1";
       canMove = "1";
@@ -30,132 +30,22 @@
       anchorBottom = "0";
       anchorBottom = "0";
       anchorLeft = "1";
       anchorLeft = "1";
       anchorRight = "0";
       anchorRight = "0";
-      position = "339 179";
-      extent = "346 409";
+      position = "132 80";
+      extent = "733 582";
       minExtent = "48 92";
       minExtent = "48 92";
       horizSizing = "center";
       horizSizing = "center";
       vertSizing = "center";
       vertSizing = "center";
       profile = "ToolsGuiWindowProfile";
       profile = "ToolsGuiWindowProfile";
-      visible = "0";
-      active = "1";
-      tooltipProfile = "ToolsGuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      hidden = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-
-      new GuiButtonCtrl() {
-         text = "Done";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-         position = "271 377";
-         extent = "64 22";
-         minExtent = "8 2";
-         horizSizing = "left";
-         vertSizing = "top";
-         profile = "ToolsGuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "ImportAssetOptionsWindow.saveAssetOptions();";
-         tooltipProfile = "ToolsGuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiScrollCtrl() {
-         willFirstRespond = "1";
-         hScrollBar = "dynamic";
-         vScrollBar = "dynamic";
-         lockHorizScroll = "0";
-         lockVertScroll = "0";
-         constantThumbHeight = "0";
-         childMargin = "0 0";
-         mouseWheelScrollSpeed = "-1";
-         margin = "0 0 0 0";
-         padding = "0 0 0 0";
-         anchorTop = "1";
-         anchorBottom = "0";
-         anchorLeft = "1";
-         anchorRight = "0";
-         position = "9 26";
-         extent = "326 344";
-         minExtent = "8 2";
-         horizSizing = "width";
-         vertSizing = "height";
-         profile = "ToolsGuiScrollProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-
-         new GuiVariableInspector(ImportOptionsList) {
-            dividerMargin = "5";
-            showCustomFields = "1";
-            stackingType = "Vertical";
-            horizStacking = "Left to Right";
-            vertStacking = "Top to Bottom";
-            padding = "1";
-            dynamicSize = "1";
-            dynamicNonStackExtent = "0";
-            dynamicPos = "0";
-            changeChildSizeToFit = "1";
-            changeChildPosition = "1";
-            position = "1 1";
-            extent = "309 64";
-            minExtent = "16 16";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiDefaultProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-      };
-   };
-   new GuiWindowCtrl(ImportAssetConfigEditorWindow) {
-      text = "Import Options Config";
-      resizeWidth = "1";
-      resizeHeight = "1";
-      canMove = "1";
-      canClose = "1";
-      canMinimize = "0";
-      canMaximize = "0";
-      canCollapse = "0";
-      edgeSnap = "1";
-      margin = "0 0 0 0";
-      padding = "0 0 0 0";
-      anchorTop = "1";
-      anchorBottom = "0";
-      anchorLeft = "1";
-      anchorRight = "0";
-      position = "324 132";
-      extent = "376 503";
-      minExtent = "48 92";
-      horizSizing = "center";
-      vertSizing = "center";
-      profile = "ToolsGuiWindowProfile";
-      visible = "0";
+      visible = "1";
       active = "1";
       active = "1";
       tooltipProfile = "ToolsGuiToolTipProfile";
       tooltipProfile = "ToolsGuiToolTipProfile";
       hovertime = "1000";
       hovertime = "1000";
       isContainer = "1";
       isContainer = "1";
-      hidden = "1";
       canSave = "1";
       canSave = "1";
       canSaveDynamicFields = "0";
       canSaveDynamicFields = "0";
-      closeCommand = "ImportAssetConfigEditorWindow.close();";
 
 
       new GuiTextCtrl() {
       new GuiTextCtrl() {
-         text = "Configuration Name:";
+         text = "Target Path:";
          maxLength = "1024";
          maxLength = "1024";
          margin = "0 0 0 0";
          margin = "0 0 0 0";
          padding = "0 0 0 0";
          padding = "0 0 0 0";
@@ -163,8 +53,8 @@
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "10 26";
-         extent = "100 17";
+         position = "12 30";
+         extent = "116 17";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "right";
          horizSizing = "right";
          vertSizing = "bottom";
          vertSizing = "bottom";
@@ -177,7 +67,7 @@
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiTextEditCtrl(AssetImportConfigName) {
+      new GuiTextEditCtrl(AssetImportTargetAddress) {
          historySize = "0";
          historySize = "0";
          tabComplete = "0";
          tabComplete = "0";
          sinkAllKeyEvents = "0";
          sinkAllKeyEvents = "0";
@@ -190,162 +80,41 @@
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "113 25";
-         extent = "250 18";
+         position = "135 30";
+         extent = "569 18";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "width";
          horizSizing = "width";
          vertSizing = "bottom";
          vertSizing = "bottom";
          profile = "ToolsGuiTextEditProfile";
          profile = "ToolsGuiTextEditProfile";
          visible = "1";
          visible = "1";
-         active = "1";
+         active = "0";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "1";
          isContainer = "1";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiButtonCtrl() {
-         text = "Done";
+      new GuiBitmapButtonCtrl() {
+         bitmap = "tools/gui/images/iconOpen.png";
+         bitmapMode = "Centered";
+         autoFitExtents = "0";
+         useModifiers = "0";
+         useStates = "1";
+         masked = "0";
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
-         position = "301 471";
-         extent = "64 22";
+         position = "707 27";
+         extent = "22 22";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "left";
          horizSizing = "left";
-         vertSizing = "top";
+         vertSizing = "bottom";
          profile = "ToolsGuiButtonProfile";
          profile = "ToolsGuiButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
-         command = "ImportAssetConfigEditorWindow.saveAssetOptionsConfig();";
-         tooltipProfile = "ToolsGuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiScrollCtrl(ImportAssetConfigEditorScroll) {
-         willFirstRespond = "1";
-         hScrollBar = "dynamic";
-         vScrollBar = "dynamic";
-         lockHorizScroll = "0";
-         lockVertScroll = "0";
-         constantThumbHeight = "0";
-         childMargin = "0 0";
-         mouseWheelScrollSpeed = "-1";
-         margin = "0 0 0 0";
-         padding = "0 0 0 0";
-         anchorTop = "1";
-         anchorBottom = "0";
-         anchorLeft = "1";
-         anchorRight = "0";
-         position = "9 50";
-         extent = "356 414";
-         minExtent = "8 2";
-         horizSizing = "width";
-         vertSizing = "height";
-         profile = "ToolsGuiScrollProfile";
-         visible = "1";
-         active = "1";
+         command = "SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, \"assetImportUpdatePath\");\nSelectAssetPath.selectWindow();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-
-         new GuiVariableInspector(ImportOptionsConfigList) {
-            dividerMargin = "5";
-            showCustomFields = "1";
-            stackingType = "Vertical";
-            horizStacking = "Left to Right";
-            vertStacking = "Top to Bottom";
-            padding = "1";
-            dynamicSize = "1";
-            dynamicNonStackExtent = "0";
-            dynamicPos = "0";
-            changeChildSizeToFit = "1";
-            changeChildPosition = "1";
-            position = "1 1";
-            extent = "339 64";
-            minExtent = "16 16";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiDefaultProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-      };
-   };
-   new GuiWindowCtrl(ImportAssetWindow) {
-      text = "Import Assets";
-      resizeWidth = "1";
-      resizeHeight = "1";
-      canMove = "1";
-      canClose = "0";
-      canMinimize = "0";
-      canMaximize = "0";
-      canCollapse = "0";
-      edgeSnap = "1";
-      margin = "0 0 0 0";
-      padding = "0 0 0 0";
-      anchorTop = "1";
-      anchorBottom = "0";
-      anchorLeft = "1";
-      anchorRight = "0";
-      position = "145 133";
-      extent = "733 502";
-      minExtent = "48 92";
-      horizSizing = "center";
-      vertSizing = "center";
-      profile = "ToolsGuiWindowProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "ToolsGuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-
-      new GuiButtonCtrl() {
-         text = "Done";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-         position = "589 470";
-         extent = "64 22";
-         minExtent = "8 2";
-         horizSizing = "left";
-         vertSizing = "top";
-         profile = "ToolsGuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "ImportAssetWindow.ImportAssets();";
-         tooltipProfile = "ToolsGuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl() {
-         text = "Cancel";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-         position = "657 470";
-         extent = "64 22";
-         minExtent = "8 2";
-         horizSizing = "left";
-         vertSizing = "top";
-         profile = "ToolsGuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "ImportAssetWindow.close();";
-         tooltipProfile = "ToolsGuiToolTipProfile";
+         tooltip = "New Module";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
          canSave = "1";
          canSave = "1";
@@ -360,12 +129,12 @@
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "12 30";
+         position = "12 54";
          extent = "116 17";
          extent = "116 17";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "right";
          horizSizing = "right";
          vertSizing = "bottom";
          vertSizing = "bottom";
-         profile = "ToolsGuiDefaultProfile";
+         profile = "ToolsGuiTextProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
@@ -374,12 +143,12 @@
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiPopUpMenuCtrlEx(ImportAssetModuleList) {
-         maxPopupHeight = "200";
-         sbUsesNAColor = "0";
-         reverseTextList = "0";
-         bitmapBounds = "16 16";
-         hotTrackCallback = "0";
+      new GuiTextEditCtrl(AssetImportTargetModule) {
+         historySize = "0";
+         tabComplete = "0";
+         sinkAllKeyEvents = "0";
+         password = "0";
+         passwordMask = "*";
          maxLength = "1024";
          maxLength = "1024";
          margin = "0 0 0 0";
          margin = "0 0 0 0";
          padding = "0 0 0 0";
          padding = "0 0 0 0";
@@ -387,46 +156,20 @@
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "134 27";
-         extent = "569 22";
+         position = "135 53";
+         extent = "569 18";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "width";
          horizSizing = "width";
          vertSizing = "bottom";
          vertSizing = "bottom";
-         profile = "ToolsGuiPopupMenuProfile";
+         profile = "ToolsGuiTextEditProfile";
          visible = "1";
          visible = "1";
-         active = "1";
+         active = "0";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "1";
          isContainer = "1";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiBitmapButtonCtrl() {
-         bitmap = "tools/gui/images/iconAdd.png";
-         bitmapMode = "Centered";
-         autoFitExtents = "0";
-         useModifiers = "0";
-         useStates = "1";
-         masked = "0";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-         position = "707 27";
-         extent = "22 22";
-         minExtent = "8 2";
-         horizSizing = "left";
-         vertSizing = "bottom";
-         profile = "ToolsGuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "Canvas.pushDialog(AssetBrowser_addModule);\nAssetBrowser_addModuleWindow.selectWindow();";
-         tooltipProfile = "GuiToolTipProfile";
-         tooltip = "New Module";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
       new GuiTextCtrl() {
       new GuiTextCtrl() {
          text = "Import Options Config:";
          text = "Import Options Config:";
          maxLength = "1024";
          maxLength = "1024";
@@ -436,7 +179,7 @@
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "12 56";
+         position = "12 79";
          extent = "116 17";
          extent = "116 17";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "right";
          horizSizing = "right";
@@ -463,12 +206,12 @@
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "126 53";
-         extent = "540 22";
+         position = "135 78";
+         extent = "569 22";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "width";
          horizSizing = "width";
          vertSizing = "bottom";
          vertSizing = "bottom";
-         profile = "ToolsGuiPopupMenuProfile";
+         profile = "ToolsGuiPopUpMenuProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
@@ -478,7 +221,7 @@
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
       new GuiBitmapButtonCtrl() {
       new GuiBitmapButtonCtrl() {
-         bitmap = "tools/gui/images/iconAdd.png";
+         bitmap = "tools/gui/images/save-as";
          bitmapMode = "Centered";
          bitmapMode = "Centered";
          autoFitExtents = "0";
          autoFitExtents = "0";
          useModifiers = "0";
          useModifiers = "0";
@@ -487,7 +230,7 @@
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
-         position = "670 53";
+         position = "711 77";
          extent = "15 22";
          extent = "15 22";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "left";
          horizSizing = "left";
@@ -495,87 +238,285 @@
          profile = "ToolsGuiButtonProfile";
          profile = "ToolsGuiButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
-         command = "ImportAssetConfigEditorWindow.addNewConfig();";
+         command = "Canvas.pushDialog(AssetImportConfigEditor);";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
-         tooltip = "New Config";
+         tooltip = "Edit Config";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiBitmapButtonCtrl() {
-         bitmap = "tools/gui/images/iconInformation.png";
-         bitmapMode = "Centered";
-         autoFitExtents = "0";
-         useModifiers = "0";
-         useStates = "1";
-         masked = "0";
+      new GuiSplitContainer() {
+         orientation = "Vertical";
+         splitterSize = "2";
+         splitPoint = "182 100";
+         fixedPanel = "None";
+         fixedSize = "100";
+         docking = "None";
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "5 102";
+         extent = "723 447";
+         minExtent = "64 64";
+         horizSizing = "width";
+         vertSizing = "height";
+         profile = "ToolsGuiSolidDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+
+         new GuiPanel() {
+            docking = "Client";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "0 0";
+            extent = "180 447";
+            minExtent = "16 16";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "ToolsGuiSolidDefaultProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            internalName = "Panel1";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+
+            new GuiScrollCtrl() {
+               willFirstRespond = "1";
+               hScrollBar = "alwaysOff";
+               vScrollBar = "dynamic";
+               lockHorizScroll = "0";
+               lockVertScroll = "0";
+               constantThumbHeight = "0";
+               childMargin = "0 0";
+               mouseWheelScrollSpeed = "-1";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "3 3";
+               extent = "180 444";
+               minExtent = "100 50";
+               horizSizing = "width";
+               vertSizing = "height";
+               profile = "ToolsGuiScrollProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+
+               new GuiMouseEventCtrl(NewAssetsPanelInputs) {
+                  lockMouse = "0";
+                  position = "1 0";
+                  extent = "339 467";
+                  minExtent = "8 2";
+                  horizSizing = "width";
+                  vertSizing = "height";
+                  profile = "GuiDefaultProfile";
+                  visible = "1";
+                  active = "1";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "0";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+               new GuiTreeViewCtrl() {
+                  tabSize = "16";
+                  textOffset = "2";
+                  fullRowSelect = "0";
+                  itemHeight = "21";
+                  destroyTreeOnSleep = "1";
+                  mouseDragging = "1";
+                  multipleSelections = "1";
+                  deleteObjectAllowed = "1";
+                  dragToItemAllowed = "1";
+                  clearAllOnSingleSelection = "1";
+                  showRoot = "1";
+                  useInspectorTooltips = "0";
+                  tooltipOnWidthOnly = "0";
+                  showObjectIds = "1";
+                  showClassNames = "1";
+                  showObjectNames = "1";
+                  showInternalNames = "1";
+                  showClassNameForUnnamedObjects = "0";
+                  compareToObjectID = "1";
+                  canRenameObjects = "1";
+                  renameInternal = "0";
+                  position = "1 1";
+                  extent = "180 444";
+                  minExtent = "8 2";
+                  horizSizing = "width";
+                  vertSizing = "height";
+                  profile = "ToolsGuiTreeViewProfile";
+                  visible = "1";
+                  active = "1";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "1";
+                  internalName = "NewAssetsTree";
+                  class = "NewAssetsViewTree";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+            };
+         };
+         new GuiPanel() {
+            docking = "Client";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "184 0";
+            extent = "539 447";
+            minExtent = "16 16";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "ToolsGuiSolidDefaultProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            internalName = "panel2";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+
+            new GuiScrollCtrl() {
+               willFirstRespond = "1";
+               hScrollBar = "dynamic";
+               vScrollBar = "dynamic";
+               lockHorizScroll = "0";
+               lockVertScroll = "0";
+               constantThumbHeight = "0";
+               childMargin = "0 0";
+               mouseWheelScrollSpeed = "-1";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "0 0";
+               extent = "539 447";
+               minExtent = "8 2";
+               horizSizing = "width";
+               vertSizing = "height";
+               profile = "ToolsGuiScrollProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "GuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+
+               new GuiVariableInspector() {
+                  dividerMargin = "5";
+                  showCustomFields = "1";
+                  stackingType = "Vertical";
+                  horizStacking = "Left to Right";
+                  vertStacking = "Top to Bottom";
+                  padding = "1";
+                  dynamicSize = "1";
+                  dynamicNonStackExtent = "0";
+                  dynamicPos = "0";
+                  changeChildSizeToFit = "1";
+                  changeChildPosition = "1";
+                  position = "1 1";
+                  extent = "522 615";
+                  minExtent = "16 16";
+                  horizSizing = "width";
+                  vertSizing = "height";
+                  profile = "ToolsGuiDefaultProfile";
+                  visible = "1";
+                  active = "1";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "1";
+                  internalName = "NewAssetsInspector";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+            };
+         };
+      };
+      new GuiButtonCtrl() {
+         text = "Done";
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
-         position = "690 53";
-         extent = "15 22";
+         position = "589 553";
+         extent = "64 22";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "left";
          horizSizing = "left";
-         vertSizing = "bottom";
+         vertSizing = "top";
          profile = "ToolsGuiButtonProfile";
          profile = "ToolsGuiButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
-         command = "ImportAssetConfigEditorWindow.editConfig();";
-         tooltipProfile = "GuiToolTipProfile";
-         tooltip = "Edit Config";
+         command = "ImportAssetWindow.ImportAssets();";
+         tooltipProfile = "ToolsGuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiBitmapButtonCtrl() {
-         bitmap = "tools/gui/images/iconDelete.png";
-         bitmapMode = "Centered";
-         autoFitExtents = "0";
-         useModifiers = "0";
-         useStates = "1";
-         masked = "0";
+      new GuiButtonCtrl() {
+         text = "Cancel";
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
-         position = "711 53";
-         extent = "15 22";
+         position = "657 553";
+         extent = "64 22";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "left";
          horizSizing = "left";
-         vertSizing = "bottom";
+         vertSizing = "top";
          profile = "ToolsGuiButtonProfile";
          profile = "ToolsGuiButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
-         command = "ImportAssetConfigEditorWindow.deleteConfig();";
-         tooltipProfile = "GuiToolTipProfile";
-         tooltip = "Delete Config";
+         command = "ImportAssetWindow.close();";
+         tooltipProfile = "ToolsGuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiScrollCtrl() {
-         willFirstRespond = "1";
-         hScrollBar = "dynamic";
-         vScrollBar = "dynamic";
-         lockHorizScroll = "0";
-         lockVertScroll = "0";
-         constantThumbHeight = "0";
-         childMargin = "0 0";
-         mouseWheelScrollSpeed = "-1";
+      new GuiTextCtrl(AssetImportSummarization) {
+         maxLength = "1024";
          margin = "0 0 0 0";
          margin = "0 0 0 0";
          padding = "0 0 0 0";
          padding = "0 0 0 0";
          anchorTop = "1";
          anchorTop = "1";
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "9 82";
-         extent = "713 381";
+         position = "4 554";
+         extent = "574 23";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "width";
          horizSizing = "width";
-         vertSizing = "height";
-         profile = "ToolsGuiScrollProfile";
+         vertSizing = "top";
+         profile = "ToolsGuiTextProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
@@ -583,34 +524,9 @@
          isContainer = "1";
          isContainer = "1";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
-
-         new GuiStackControl(ImportingAssetList) {
-            stackingType = "Vertical";
-            horizStacking = "Left to Right";
-            vertStacking = "Top to Bottom";
-            padding = "0";
-            dynamicSize = "1";
-            dynamicNonStackExtent = "0";
-            dynamicPos = "0";
-            changeChildSizeToFit = "0";
-            changeChildPosition = "1";
-            position = "1 1";
-            extent = "710 20";
-            minExtent = "16 16";
-            horizSizing = "width";
-            vertSizing = "bottom";
-            profile = "GuiDefaultProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
       };
       };
    };
    };
-   new GuiWindowCtrl(ImportAssetNewConfigEditorWindow) {
+   new GuiWindowCtrl(ImportAssetConfigEditorWindow) {
       text = "Import Options Config";
       text = "Import Options Config";
       resizeWidth = "1";
       resizeWidth = "1";
       resizeHeight = "1";
       resizeHeight = "1";
@@ -619,6 +535,7 @@
       canMinimize = "0";
       canMinimize = "0";
       canMaximize = "0";
       canMaximize = "0";
       canCollapse = "0";
       canCollapse = "0";
+      closeCommand = "ImportAssetConfigEditorWindow.close();";
       edgeSnap = "1";
       edgeSnap = "1";
       margin = "0 0 0 0";
       margin = "0 0 0 0";
       padding = "0 0 0 0";
       padding = "0 0 0 0";
@@ -626,9 +543,9 @@
       anchorBottom = "0";
       anchorBottom = "0";
       anchorLeft = "1";
       anchorLeft = "1";
       anchorRight = "0";
       anchorRight = "0";
-      position = "348 332";
-      extent = "376 70";
-      minExtent = "48 70";
+      position = "324 132";
+      extent = "376 503";
+      minExtent = "48 92";
       horizSizing = "center";
       horizSizing = "center";
       vertSizing = "center";
       vertSizing = "center";
       profile = "ToolsGuiWindowProfile";
       profile = "ToolsGuiWindowProfile";
@@ -664,7 +581,7 @@
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiTextEditCtrl(AssetImportNewConfigName) {
+      new GuiTextEditCtrl(AssetImportConfigName) {
          historySize = "0";
          historySize = "0";
          tabComplete = "0";
          tabComplete = "0";
          sinkAllKeyEvents = "0";
          sinkAllKeyEvents = "0";
@@ -696,7 +613,7 @@
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
-         position = "301 45";
+         position = "301 471";
          extent = "64 22";
          extent = "64 22";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "left";
          horizSizing = "left";
@@ -704,13 +621,69 @@
          profile = "ToolsGuiButtonProfile";
          profile = "ToolsGuiButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
-         command = "ImportAssetConfigEditorWindow.createNewImportConfig();";
+         command = "ImportAssetConfigEditorWindow.saveAssetOptionsConfig();";
          tooltipProfile = "ToolsGuiToolTipProfile";
          tooltipProfile = "ToolsGuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
+      new GuiScrollCtrl(ImportAssetConfigEditorScroll) {
+         willFirstRespond = "1";
+         hScrollBar = "dynamic";
+         vScrollBar = "dynamic";
+         lockHorizScroll = "0";
+         lockVertScroll = "0";
+         constantThumbHeight = "0";
+         childMargin = "0 0";
+         mouseWheelScrollSpeed = "-1";
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "9 50";
+         extent = "356 414";
+         minExtent = "8 2";
+         horizSizing = "width";
+         vertSizing = "height";
+         profile = "ToolsGuiScrollProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+
+         new GuiVariableInspector(ImportOptionsConfigList) {
+            dividerMargin = "5";
+            showCustomFields = "1";
+            stackingType = "Vertical";
+            horizStacking = "Left to Right";
+            vertStacking = "Top to Bottom";
+            padding = "1";
+            dynamicSize = "1";
+            dynamicNonStackExtent = "0";
+            dynamicPos = "0";
+            changeChildSizeToFit = "1";
+            changeChildPosition = "1";
+            position = "1 1";
+            extent = "339 64";
+            minExtent = "16 16";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "GuiDefaultProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+         };
+      };
    };
    };
 };
 };
 //--- OBJECT WRITE END ---
 //--- OBJECT WRITE END ---

+ 118 - 0
Templates/BaseGame/game/tools/assetBrowser/guis/newFolder.gui

@@ -0,0 +1,118 @@
+//--- OBJECT WRITE BEGIN ---
+%guiContent = new GuiControl(AssetBrowser_newFolder) {
+   position = "0 0";
+   extent = "1024 768";
+   minExtent = "8 2";
+   horizSizing = "right";
+   vertSizing = "bottom";
+   profile = "ToolsGuiDefaultNonModalProfile";
+   visible = "1";
+   active = "1";
+   tooltipProfile = "GuiToolTipProfile";
+   hovertime = "1000";
+   isContainer = "1";
+   canSave = "1";
+   canSaveDynamicFields = "1";
+      Enabled = "1";
+
+   new GuiWindowCtrl() {
+      text = "Name New Folder";
+      resizeWidth = "1";
+      resizeHeight = "0";
+      canMove = "1";
+      canClose = "1";
+      canMinimize = "0";
+      canMaximize = "0";
+      canCollapse = "0";
+      edgeSnap = "1";
+      margin = "0 0 0 0";
+      padding = "0 0 0 0";
+      anchorTop = "1";
+      anchorBottom = "0";
+      anchorLeft = "1";
+      anchorRight = "0";
+      position = "362 334";
+      extent = "355 99";
+      minExtent = "48 92";
+      horizSizing = "center";
+      vertSizing = "center";
+      profile = "ToolsGuiWindowProfile";
+      visible = "1";
+      active = "1";
+      command = "Canvas.popDialog(AssetBrowser_newFolder);";
+      tooltipProfile = "ToolsGuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "1";
+      canSave = "1";
+      canSaveDynamicFields = "0";
+
+      new GuiButtonCtrl() {
+         text = "Select";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "207 68";
+         extent = "71 22";
+         minExtent = "8 2";
+         horizSizing = "left";
+         vertSizing = "top";
+         profile = "ToolsGuiButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "Canvas.popDialog(AssetBrowser_newFolder); AssetBrowser.doCreateNewFolder();";
+         tooltipProfile = "ToolsGuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiButtonCtrl() {
+         text = "Cancel";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "284 68";
+         extent = "64 22";
+         minExtent = "8 2";
+         horizSizing = "left";
+         vertSizing = "top";
+         profile = "ToolsGuiButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "Canvas.popDialog(AssetBrowser_newFolder);";
+         tooltipProfile = "ToolsGuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiTextEditCtrl(AssetBrowser_newFolderNameTxt) {
+         historySize = "0";
+         tabComplete = "0";
+         sinkAllKeyEvents = "0";
+         password = "0";
+         passwordMask = "*";
+         maxLength = "1024";
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "8 38";
+         extent = "341 18";
+         minExtent = "8 2";
+         horizSizing = "width";
+         vertSizing = "height";
+         profile = "ToolsGuiTextEditProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "ToolsGuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+   };
+};
+//--- OBJECT WRITE END ---

+ 257 - 0
Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui

@@ -0,0 +1,257 @@
+//--- OBJECT WRITE BEGIN ---
+%guiContent = new GuiControl(SelectAssetPath) {
+   position = "0 0";
+   extent = "1024 768";
+   minExtent = "8 2";
+   horizSizing = "right";
+   vertSizing = "bottom";
+   profile = "GuiDefaultProfile";
+   visible = "1";
+   active = "1";
+   tooltipProfile = "GuiToolTipProfile";
+   hovertime = "1000";
+   isContainer = "1";
+   canSave = "1";
+   canSaveDynamicFields = "1";
+
+   new GuiWindowCtrl() {
+      text = "Select Path";
+      resizeWidth = "1";
+      resizeHeight = "1";
+      canMove = "1";
+      canClose = "1";
+      canMinimize = "1";
+      canMaximize = "1";
+      canCollapse = "0";
+      edgeSnap = "1";
+      margin = "0 0 0 0";
+      padding = "0 0 0 0";
+      anchorTop = "1";
+      anchorBottom = "0";
+      anchorLeft = "1";
+      anchorRight = "0";
+      position = "329 147";
+      extent = "296 442";
+      minExtent = "8 2";
+      horizSizing = "right";
+      vertSizing = "bottom";
+      profile = "ToolsGuiWindowProfile";
+      visible = "1";
+      active = "1";
+      tooltipProfile = "GuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "1";
+      canSave = "1";
+      canSaveDynamicFields = "0";
+
+      new GuiContainer() {
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "0 24";
+         extent = "295 31";
+         minExtent = "8 2";
+         horizSizing = "width";
+         vertSizing = "bottom";
+         profile = "inspectorStyleRolloutDarkProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+
+         new GuiTextEditCtrl() {
+            historySize = "0";
+            tabComplete = "0";
+            sinkAllKeyEvents = "0";
+            password = "0";
+            passwordMask = "*";
+            text = "Search Folders...";
+            maxLength = "1024";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "0 0";
+            extent = "296 18";
+            minExtent = "8 2";
+            horizSizing = "width";
+            vertSizing = "height";
+            profile = "ToolsGuiTextEditProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            internalName = "AssetBrowserFolderSearchFilter";
+            class = "AssetBrowserSearchFilterTxt";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+         };
+         new GuiBitmapButtonCtrl() {
+            bitmap = "tools/gui/images/clear-icon";
+            bitmapMode = "Centered";
+            autoFitExtents = "0";
+            useModifiers = "0";
+            useStates = "1";
+            masked = "0";
+            groupNum = "-1";
+            buttonType = "PushButton";
+            useMouseEvents = "0";
+            position = "280 0";
+            extent = "15 15";
+            minExtent = "8 2";
+            horizSizing = "left";
+            vertSizing = "bottom";
+            profile = "GuiDefaultProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            tooltip = "ClearFolderFilterBtn";
+            hovertime = "1000";
+            isContainer = "0";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+         };
+      };
+      new GuiContainer() {
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "0 41";
+         extent = "297 369";
+         minExtent = "8 2";
+         horizSizing = "width";
+         vertSizing = "height";
+         profile = "ToolsGuiSolidDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+
+         new GuiScrollCtrl() {
+            willFirstRespond = "1";
+            hScrollBar = "alwaysOff";
+            vScrollBar = "dynamic";
+            lockHorizScroll = "1";
+            lockVertScroll = "0";
+            constantThumbHeight = "0";
+            childMargin = "0 0";
+            mouseWheelScrollSpeed = "-1";
+            docking = "Client";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "0 0";
+            extent = "297 369";
+            minExtent = "8 8";
+            horizSizing = "width";
+            vertSizing = "height";
+            profile = "GuiEditorScrollProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "ToolsGuiSolidDefaultProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+
+            new GuiTreeViewCtrl() {
+               class="selectAssetPathTree";
+               tabSize = "16";
+               textOffset = "2";
+               fullRowSelect = "0";
+               itemHeight = "21";
+               destroyTreeOnSleep = "1";
+               mouseDragging = "1";
+               multipleSelections = "1";
+               deleteObjectAllowed = "1";
+               dragToItemAllowed = "1";
+               clearAllOnSingleSelection = "1";
+               showRoot = "1";
+               useInspectorTooltips = "0";
+               tooltipOnWidthOnly = "0";
+               showObjectIds = "1";
+               showClassNames = "1";
+               showObjectNames = "1";
+               showInternalNames = "1";
+               showClassNameForUnnamedObjects = "0";
+               compareToObjectID = "1";
+               canRenameObjects = "1";
+               renameInternal = "0";
+               position = "1 1";
+               extent = "295 210";
+               minExtent = "8 2";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "ToolsGuiTreeViewProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "GuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               internalName = "folderTree";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+         };
+      };
+      new GuiButtonCtrl() {
+         text = "Cancel";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "225 413";
+         extent = "69 24";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "ToolsGuiButtonProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+         command="Canvas.popDialog(SelectAssetPath);";
+      };
+      new GuiButtonCtrl() {
+         text = "Select";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "139 413";
+         extent = "85 24";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "ToolsGuiButtonProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+         command="SelectAssetPath.selectPath();";
+      };
+   };
+};
+//--- OBJECT WRITE END ---

+ 20 - 0
Templates/BaseGame/game/tools/assetBrowser/main.cs

@@ -64,10 +64,13 @@ function initializeAssetBrowser()
    exec("./guis/newComponentAsset.gui");
    exec("./guis/newComponentAsset.gui");
    exec("./guis/editAsset.gui");
    exec("./guis/editAsset.gui");
    exec("./guis/assetImport.gui");
    exec("./guis/assetImport.gui");
+   exec("./guis/assetImportConfigEditor.gui");
    exec("./guis/selectModule.gui");
    exec("./guis/selectModule.gui");
+   exec("./guis/selectPath.gui");
    exec("./guis/editModule.gui");
    exec("./guis/editModule.gui");
    exec("./guis/importTemplateModules.gui");
    exec("./guis/importTemplateModules.gui");
    exec("./guis/assetPreviewButtonsTemplate.gui");
    exec("./guis/assetPreviewButtonsTemplate.gui");
+   exec("./guis/newFolder.gui");
 
 
    exec("./scripts/assetBrowser.cs");
    exec("./scripts/assetBrowser.cs");
    exec("./scripts/popupMenus.cs");
    exec("./scripts/popupMenus.cs");
@@ -79,6 +82,9 @@ function initializeAssetBrowser()
    exec("./scripts/editAsset.cs");
    exec("./scripts/editAsset.cs");
    exec("./scripts/editModule.cs");   
    exec("./scripts/editModule.cs");   
    exec("./scripts/selectModule.cs");   
    exec("./scripts/selectModule.cs");   
+   exec("./scripts/assetImportConfigEditor.cs");  
+   exec("./scripts/directoryHandling.cs");
+   exec("./scripts/selectPath.cs");
    
    
    //Processing for the different asset types
    //Processing for the different asset types
    exec("./scripts/assetTypes/component.cs"); 
    exec("./scripts/assetTypes/component.cs"); 
@@ -108,6 +114,20 @@ function initializeAssetBrowser()
    Input::GetEventManager().subscribe( AssetBrowser, "DropFile" );
    Input::GetEventManager().subscribe( AssetBrowser, "DropFile" );
    Input::GetEventManager().subscribe( AssetBrowser, "EndDropFiles" );
    Input::GetEventManager().subscribe( AssetBrowser, "EndDropFiles" );
    
    
+   if(!isObject(AssetImportSettings))
+   {
+      new Settings(AssetImportSettings) 
+      { 
+         file = $AssetBrowser::importConfigsFile; 
+      };
+   }
+   AssetImportSettings.read();
+   
+   ImportAssetWindow.reloadImportOptionConfigs();
+   
+   if(!isObject(ImportAssetTree))
+      new GuiTreeViewCtrl(ImportAssetTree);
+   
    AssetBrowser.buildPopupMenus();
    AssetBrowser.buildPopupMenus();
 }
 }
 
 

+ 99 - 475
Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs

@@ -41,27 +41,20 @@ function AssetBrowser::onWake(%this)
    if(!isObject(AssetPreviewArray))
    if(!isObject(AssetPreviewArray))
       new ArrayObject(AssetPreviewArray);
       new ArrayObject(AssetPreviewArray);
       
       
-   if(!isObject(ImportAssetTree))
-      new GuiTreeViewCtrl(ImportAssetTree);
+   if(!isObject(%this.dirHandler))
+      %this.dirHandler = makedirectoryHandler(AssetBrowser-->filterTree, "cache,shaderCache", ""); 
       
       
-   if(!isObject(AssetBrowser_NavPrevHistoryList))
-   {
-      new ArrayObject(AssetBrowser_NavPrevHistoryList);
-   }
-   if(!isObject(AssetBrowser_NavForeHistoryList))
-   {
-      new ArrayObject(AssetBrowser_NavForeHistoryList);
-   }
+   AssetBrowser-->filterTree.buildIconTable( ":tools/classIcons/Prefab:tools/classIcons/Prefab" @
+                                             ":tools/classIcons/SimSet:tools/classIcons/SimSet");
       
       
    %this.importingFilesArray = new ArrayObject();
    %this.importingFilesArray = new ArrayObject();
    %this.importAssetUnprocessedListArray = new ArrayObject();
    %this.importAssetUnprocessedListArray = new ArrayObject();
    %this.importAssetFinalListArray = new ArrayObject();
    %this.importAssetFinalListArray = new ArrayObject();
-   
    %this.isReImportingAsset = false;
    %this.isReImportingAsset = false;
+   
    %this.coreModulesFilter = false;
    %this.coreModulesFilter = false;
    %this.toolsModulesFilter = false;
    %this.toolsModulesFilter = false;
    %this.onlyShowModulesWithAssets = false;
    %this.onlyShowModulesWithAssets = false;
-   %this.treeFilterMode = "list";
    
    
    %this.folderPanelState = true;
    %this.folderPanelState = true;
    %this.folderPanelSplit = 0;
    %this.folderPanelSplit = 0;
@@ -109,7 +102,7 @@ function AssetBrowser::viewCoreModulesFilter(%this)
    
    
    EditorSettings.setValue("Assets/Browser/showCoreModule", %newVal);
    EditorSettings.setValue("Assets/Browser/showCoreModule", %newVal);
     
     
-   AssetBrowser.loadFilters();
+   AssetBrowser.refresh();
 }
 }
 
 
 function AssetBrowser::viewToolsModulesFilter(%this)
 function AssetBrowser::viewToolsModulesFilter(%this)
@@ -121,7 +114,7 @@ function AssetBrowser::viewToolsModulesFilter(%this)
    
    
    EditorSettings.setValue("Assets/Browser/showToolsModule", %newVal);
    EditorSettings.setValue("Assets/Browser/showToolsModule", %newVal);
     
     
-   AssetBrowser.loadFilters();
+   AssetBrowser.refresh();
 }
 }
 
 
 function AssetBrowser::viewPopulatedModulesFilter(%this)
 function AssetBrowser::viewPopulatedModulesFilter(%this)
@@ -133,7 +126,7 @@ function AssetBrowser::viewPopulatedModulesFilter(%this)
    
    
    EditorSettings.setValue("Assets/Browser/showOnlyPopulatedModule", %newVal);
    EditorSettings.setValue("Assets/Browser/showOnlyPopulatedModule", %newVal);
     
     
-   AssetBrowser.loadFilters();
+   AssetBrowser.refresh();
 }
 }
 
 
 function AssetBrowser::toggleShowingFolders(%this)
 function AssetBrowser::toggleShowingFolders(%this)
@@ -145,7 +138,7 @@ function AssetBrowser::toggleShowingFolders(%this)
    
    
    EditorSettings.setValue("Assets/Browser/showFolders", %newVal);
    EditorSettings.setValue("Assets/Browser/showFolders", %newVal);
     
     
-   AssetBrowser.loadFilters();
+   AssetBrowser.refresh();
 }
 }
 
 
 function AssetBrowser::toggleShowingEmptyFolders(%this)
 function AssetBrowser::toggleShowingEmptyFolders(%this)
@@ -157,19 +150,7 @@ function AssetBrowser::toggleShowingEmptyFolders(%this)
    
    
    EditorSettings.setValue("Assets/Browser/showEmptyFolders", %newVal);
    EditorSettings.setValue("Assets/Browser/showEmptyFolders", %newVal);
     
     
-   AssetBrowser.loadFilters();
-}
-
-function AssetBrowser::viewListFilter(%this)
-{
-   %this.treeFilterMode = "list";
-   AssetBrowser.loadFilters();
-}
-
-function AssetBrowser::viewTagsFilter(%this)
-{
-   %this.treeFilterMode = "tags";
-   AssetBrowser.loadFilters();
+   AssetBrowser.refresh();
 }
 }
 
 
 function AssetBrowser::toggleAssetTypeFilter(%this, %assetTypeIdx)
 function AssetBrowser::toggleAssetTypeFilter(%this, %assetTypeIdx)
@@ -223,6 +204,7 @@ function AssetBrowser::toggleAssetTypeFilter(%this, %assetTypeIdx)
    %this.rebuildAssetArray();
    %this.rebuildAssetArray();
 }
 }
 
 
+//
 function AssetBrowser::selectAsset( %this, %asset )
 function AssetBrowser::selectAsset( %this, %asset )
 {
 {
    if(AssetBrowser.selectCallback !$= "")
    if(AssetBrowser.selectCallback !$= "")
@@ -280,10 +262,8 @@ function AssetBrowser::showDialog( %this, %AssetTypeFilter, %selectCallback, %ta
    {
    {
       %this-->SelectButton.setHidden(false); 
       %this-->SelectButton.setHidden(false); 
    }
    }
-   
-   //AssetBrowser_importAssetWindow.setVisible(0);
-   //AssetBrowser_importAssetConfigWindow.setVisible(0);
-   AssetBrowser.loadFilters();
+
+   AssetBrowser.loadDirectories();
 }
 }
 
 
 function AssetBrowser::hideDialog( %this )
 function AssetBrowser::hideDialog( %this )
@@ -397,6 +377,10 @@ function AssetBrowser::buildPreviewArray( %this, %asset, %moduleName )
    AssetPreviewArray.add( %previewButton, %this.previewData.previewImage );
    AssetPreviewArray.add( %previewButton, %this.previewData.previewImage );
 }
 }
 
 
+function AssetBrowser::refresh(%this)
+{
+   %this.navigateTo(%this.dirHandler.currentAddress);  
+}
 //
 //
 //
 //
 function AssetPreviewButton::onClick(%this)
 function AssetPreviewButton::onClick(%this)
@@ -411,246 +395,31 @@ function AssetPreviewButton::onDoubleClick(%this)
 //
 //
 //
 //
 
 
-function AssetBrowser::loadFolders(%this, %path, %parentId)
-{
-   //utilize home dir project setting here
-   %paths = getDirectoryList(%path);
-   for(%i=0; %i < getFieldCount(%paths); %i++)
-   {
-      %childPath = getField(%paths, %i);
-      
-      %folderCount = getTokenCount(%childPath, "/");
-      
-      for(%f=0; %f < %folderCount; %f++)
-      {
-         %folderName = getToken(%childPath, "/", %f);
-         
-         //we don't need to display the shadercache folder
-         if(%parentId == 1 && (%folderName $= "shaderCache" || %folderName $= "cache"))
-            continue;
-         
-         %iconIdx = 1;
-         
-         if(ModuleDatabase.findModule(%folderName) !$= "")
-            %iconIdx = 0;
-         
-         %searchFoldersText = AssetBrowserFolderSearchFilter.getText();
-         if(%searchFoldersText !$= "Search Folders...")
-         {
-            if(strstr(strlwr(%folderName), strlwr(%searchFoldersText)) != -1)
-            {
-               %folderID = AssetBrowser-->filterTree.insertItem(%parentId, %folderName, %path, "", %iconIdx, %iconIdx);
-         
-            %this.loadFolders(%path @ "/" @ %folderName, %folderID);  
-            }
-         }
-         else
-         {
-            %folderID = AssetBrowser-->filterTree.insertItem(%parentId, %folderName, %path, "", %iconIdx, %iconIdx);
-         
-            %this.loadFolders(%path @ "/" @ %folderName, %folderID);
-         }
-      }
-   }
-}
-
-function AssetBrowser::loadFilters( %this )
+function AssetBrowser::loadDirectories( %this )
 {
 {
    AssetBrowser-->filterTree.clear();
    AssetBrowser-->filterTree.clear();
-
-   AssetBrowser-->filterTree.buildIconTable( "tools/classIcons/Prefab" @
-                                             ":tools/classIcons/SimSet");
    
    
    %dataItem = AssetBrowser-->filterTree.insertItem(0, "Data");
    %dataItem = AssetBrowser-->filterTree.insertItem(0, "Data");
-   %this.loadFolders("Data", %dataItem);
+   %this.dirHandler.loadFolders("Data", %dataItem);
    
    
    //If set to, show core
    //If set to, show core
    if(%this.coreModulesFilter)
    if(%this.coreModulesFilter)
    {
    {
       %coreItem = AssetBrowser-->filterTree.insertItem(0, "Core");
       %coreItem = AssetBrowser-->filterTree.insertItem(0, "Core");
-      %this.loadFolders("Core", %coreItem);
+      %this.dirHandler.loadFolders("Core", %coreItem);
    }
    }
    
    
    //If set to, show tools
    //If set to, show tools
    if(%this.toolsModulesFilter)
    if(%this.toolsModulesFilter)
    {
    {
       %toolsItem = AssetBrowser-->filterTree.insertItem(0, "Tools");
       %toolsItem = AssetBrowser-->filterTree.insertItem(0, "Tools");
-      %this.loadFolders("Tools", %toolsItem);
+      %this.dirHandler.loadFolders("Tools", %toolsItem);
    }
    }
-
-   //AssetBrowser-->filterTree.insertItem(0, "Data");
-   
-   //get it alllll
-   /*%directoryDump = getDirectoryList("data", -1);
-   
-   %dirs = getFieldCount(%directoryDump);
-   
-   for(%i=0; %i < %dirs; %i++)
-   {
-      %folderName = getToken(%assetBasePath, "/", %f);
-
-      %folderID = AssetBrowser-->filterTree.findChildItemByName(%prevFolderID, %folderName);
-
-      if(%folderID == -1 || %folderID == 0)
-      {
-         %pathCache = "";
-         
-         for(%c=0; %c < %f; %c++)
-         {
-            %pathCache = %c == 0 ? getToken(%assetBasePath, "/", %c) : %pathCache @ "/" @ getToken(%assetBasePath, "/", %c);
-         }
-         
-         %folderID = AssetBrowser-->filterTree.insertItem(%prevFolderID, %folderName, %pathCache, "", 1, 1);
-      }
-   }*/
    
    
    AssetPreviewArray.empty();
    AssetPreviewArray.empty();
    
    
-   /*%assetQuery = new AssetQuery();
-   %numAssetsFound = AssetDatabase.findAllAssets(%assetQuery);
-   
-   for( %i=0; %i < %numAssetsFound; %i++)
-   {
-       %assetId = %assetQuery.getAsset(%i);
-       
-       %assetPath = makeRelativePath(AssetDatabase.getAssetFilePath(%assetId));
-       
-       //clean up the path
-       %assetPath = strreplace(%assetPath, "\\\\", "\\");
-       %assetPath = strreplace(%assetPath, "\\", "\\");
-       %assetPath = strreplace(%assetPath, "//", "\\");
-       
-       %assetBasePath = filePath(%assetPath);
-       
-       %foldersCount = getTokenCount(%assetBasePath, "/");
-       
-       //Build our directory structure
-       %prevFolderID = 0;
-       for(%f=0; %f < %foldersCount; %f++)
-       {
-         %folderName = getToken(%assetBasePath, "/", %f);
-
-         %folderID = AssetBrowser-->filterTree.findChildItemByName(%prevFolderID, %folderName);
-
-         if(%folderID == -1 || %folderID == 0)
-         {
-            %pathCache = "";
-            
-            for(%c=0; %c < %f; %c++)
-            {
-               %pathCache = %c == 0 ? getToken(%assetBasePath, "/", %c) : %pathCache @ "/" @ getToken(%assetBasePath, "/", %c);
-            }
-            
-            %folderID = AssetBrowser-->filterTree.insertItem(%prevFolderID, %folderName, %pathCache, "", 1, 1);
-         }
-
-         %prevFolderID = %folderID;
-       }
-       
-      //first, get the asset's module, as our major categories
-      %module = AssetDatabase.getAssetModule(%assetId);
-      
-      %moduleName = %module.moduleId;
-      
-      %moduleGroup = %module.Group;
-      if((%moduleGroup $= "Core" || %moduleGroup $= "Tools") && !%this.coreModulesFilter)
-         continue;
-      
-      //first, see if this module Module is listed already
-      /*%moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
-      
-      //if(%moduleItemId == 0)
-      //   %moduleItemId = AssetBrowser-->filterTree.insertItem(1, %moduleName, "", "", 1, 1);
-         
-      %assetType = AssetDatabase.getAssetCategory(%assetId);
-      
-      if(%assetType $= "")
-      {
-         %assetType = AssetDatabase.getAssetType(%assetId);
-         if(%assetType $= "")
-            %assetType = "Misc";
-      }
-      
-      if(AssetBrowser.assetTypeFilter !$= "" && AssetBrowser.assetTypeFilter !$= %assetType)
-         continue;
-      
-      %assetTypeId = AssetBrowser-->filterTree.findChildItemByName(%moduleItemId, %assetType);
-      
-      if(%assetTypeId == 0)
-         %assetTypeId = AssetBrowser-->filterTree.insertItem(%moduleItemId, %assetType);*/
-   //}
-
    AssetBrowser-->filterTree.buildVisibleTree(true);
    AssetBrowser-->filterTree.buildVisibleTree(true);
    
    
-   /*if(%this.treeFilterMode $= "list")
-   {
-      //First, build our our list of active modules
-      %modulesList = ModuleDatabase.findModules(true);
-      
-      for(%i=0; %i < getWordCount(%modulesList); %i++)
-      {
-         %moduleName = getWord(%modulesList, %i).ModuleId;
-         
-         %moduleGroup = getWord(%modulesList, %i).Group;
-         if((%moduleGroup $= "Core" || %moduleGroup $= "Tools") && !%this.coreModulesFilter)
-            continue;
-         
-         %moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
-         
-         if(%moduleItemId == 0)
-            %moduleItemId = AssetBrowser-->filterTree.insertItem(1, %moduleName, "", "", 1, 1); 
-      }
-
-      //Next, go through and list the asset categories
-      %assetQuery = new AssetQuery();
-      %numAssetsFound = AssetDatabase.findAllAssets(%assetQuery);
-      
-      for( %i=0; %i < %numAssetsFound; %i++)
-      {
-          %assetId = %assetQuery.getAsset(%i);
-          
-         //first, get the asset's module, as our major categories
-         %module = AssetDatabase.getAssetModule(%assetId);
-         
-         %moduleName = %module.moduleId;
-         
-         %moduleGroup = %module.Group;
-         if((%moduleGroup $= "Core" || %moduleGroup $= "Tools") && !%this.coreModulesFilter)
-            continue;
-         
-         //first, see if this module Module is listed already
-         %moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
-         
-         if(%moduleItemId == 0)
-            %moduleItemId = AssetBrowser-->filterTree.insertItem(1, %moduleName, "", "", 1, 1);
-            
-         %assetType = AssetDatabase.getAssetCategory(%assetId);
-         
-         if(%assetType $= "")
-         {
-            %assetType = AssetDatabase.getAssetType(%assetId);
-            if(%assetType $= "")
-               %assetType = "Misc";
-         }
-         
-         if(AssetBrowser.assetTypeFilter !$= "" && AssetBrowser.assetTypeFilter !$= %assetType)
-            continue;
-         
-         %assetTypeId = AssetBrowser-->filterTree.findChildItemByName(%moduleItemId, %assetType);
-         
-         if(%assetTypeId == 0)
-            %assetTypeId = AssetBrowser-->filterTree.insertItem(%moduleItemId, %assetType);
-      }
-
-      AssetBrowser-->filterTree.buildVisibleTree(true);
-   }
-   else if(%this.treeFilterMode $= "tags")
-   {
-      
-   }*/
-   
-   //%this.collapseTree();
-   
    //Remove any modules that have no assets if we have that filter on
    //Remove any modules that have no assets if we have that filter on
    if(%this.onlyShowModulesWithAssets)
    if(%this.onlyShowModulesWithAssets)
    {
    {
@@ -677,61 +446,14 @@ function AssetBrowser::loadFilters( %this )
    %dataItem = AssetBrowser-->filterTree.findItemByName("Data");
    %dataItem = AssetBrowser-->filterTree.findItemByName("Data");
    AssetBrowser-->filterTree.expandItem(%dataItem);
    AssetBrowser-->filterTree.expandItem(%dataItem);
    
    
-   AssetBrowser.expandTreeToAddress(AssetBrowser.currentAddress);
+   AssetBrowser.dirHandler.expandTreeToAddress(AssetBrowser.dirHandler.currentAddress);
    
    
-   %selectedItem = AssetBrowser.getFolderTreeItemFromAddress(AssetBrowser.currentAddress);
+   %selectedItem = AssetBrowser.dirHandler.getFolderTreeItemFromAddress(AssetBrowser.dirHandler.currentAddress);
    AssetBrowser-->filterTree.scrollVisibleByObjectId(%selectedItem);
    AssetBrowser-->filterTree.scrollVisibleByObjectId(%selectedItem);
    
    
    AssetBrowser-->filterTree.buildVisibleTree(); 
    AssetBrowser-->filterTree.buildVisibleTree(); 
-}
-
-// create category and update current material if there is one
-function AssetBrowser::createFilter( %this, %filter )
-{
-   if( %filter $= %existingFilters )
-   {
-      MessageBoxOK( "Error", "Can not create blank filter.");
-      return;
-   }
-      
-   for( %i = AssetBrowser.staticFilterObjects; %i < AssetBrowser-->filterArray.getCount() ; %i++ )
-   {
-      %existingFilters = AssetBrowser-->filterArray.getObject(%i).getObject(0).filter;
-      if( %filter $= %existingFilters )
-      {
-         MessageBoxOK( "Error", "Can not create two filters of the same name.");
-         return;
-      }
-   }
-   %container = new GuiControl(){
-      profile = "ToolsGuiDefaultProfile";
-      Position = "0 0";
-      Extent = "128 18";
-      HorizSizing = "right";
-      VertSizing = "bottom";
-      isContainer = "1";
-         
-      new GuiCheckBoxCtrl(){
-         Profile = "ToolsGuiCheckBoxListProfile";
-         position = "5 1";
-         Extent = "118 18";
-         Command = "";
-         groupNum = "0";
-         buttonType = "ToggleButton";
-         text = %filter @ " ( " @ MaterialFilterAllArray.countKey(%filter) @ " )";
-         filter = %filter;
-         Command = "AssetBrowser.preloadFilter();";
-      };
-   };
-   
-   AssetBrowser-->filterArray.add( %container );
    
    
-   // if selection exists, lets reselect it to refresh it
-   if( isObject(AssetBrowser.selectedMaterial) )
-      AssetBrowser.updateSelection( AssetBrowser.selectedMaterial, AssetBrowser.selectedPreviewImagePath );
-   
-   // material category text field to blank
-   AssetBrowser_addFilterWindow-->tagName.setText("");
+   AssetBrowser.refresh();
 }
 }
 
 
 function AssetBrowser::updateSelection( %this, %asset, %moduleName )
 function AssetBrowser::updateSelection( %this, %asset, %moduleName )
@@ -765,26 +487,6 @@ function AssetBrowser::updateSelection( %this, %asset, %moduleName )
    %this.prevSelectedMaterialHL = %asset;
    %this.prevSelectedMaterialHL = %asset;
 }
 }
 
 
-function AssetBrowser::collapseTree(%this)
-{
-   %modulesList = ModuleDatabase.findModules(true);
-      
-   for(%i=0; %i < getWordCount(%modulesList); %i++)
-   {
-      %moduleName = getWord(%modulesList, %i).ModuleId;
-      
-      %moduleGroup = getWord(%modulesList, %i).Group;
-      if((%moduleGroup $= "Core" || %moduleGroup $= "Tools") && !%this.coreModulesFilter)
-         continue;
-      
-      %moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
-      
-      AssetBrowser-->filterTree.expandItem(%moduleItemId, false);
-   }
-   
-   AssetBrowser-->filterTree.expandItem(1, true);
-}
-
 //
 //
 //needs to be deleted with the persistence manager and needs to be blanked out of the matmanager
 //needs to be deleted with the persistence manager and needs to be blanked out of the matmanager
 //also need to update instances... i guess which is the tricky part....
 //also need to update instances... i guess which is the tricky part....
@@ -893,7 +595,7 @@ function AssetBrowser::toggleTagFilterPopup(%this)
 		%moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
 		%moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
 		
 		
 		if(%moduleItemId == -1 || %moduleItemId == 0)
 		if(%moduleItemId == -1 || %moduleItemId == 0)
-			%moduleItemId = AssetBrowser-->filterTree.insertItem(1, %module.moduleId, "", "", 1, 1);
+			%moduleItemId = AssetBrowser-->filterTree.insertItem(1, %module.moduleId, "", "", 1, 2);
 			
 			
 		//now, add the asset's category
 		//now, add the asset's category
 		%assetType = AssetDatabase.getAssetCategory(%assetId);
 		%assetType = AssetDatabase.getAssetCategory(%assetId);
@@ -1015,7 +717,10 @@ function AssetPreviewButton::onRightClick(%this)
    if(%assetType $= "LevelAsset")
    if(%assetType $= "LevelAsset")
       EditLevelAssetPopup.showPopup(Canvas);  
       EditLevelAssetPopup.showPopup(Canvas);  
    else if(%assetType $= "Folder")
    else if(%assetType $= "Folder")
+   {
+      EditFolderPopup.dirPath = %this.getParent().assetPath;
       EditFolderPopup.showPopup(Canvas);  
       EditFolderPopup.showPopup(Canvas);  
+   }
    else
    else
       EditAssetPopup.showPopup(Canvas);  
       EditAssetPopup.showPopup(Canvas);  
       
       
@@ -1050,6 +755,7 @@ function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId)
       else
       else
       {
       {
          EditFolderPopup.showPopup(Canvas);
          EditFolderPopup.showPopup(Canvas);
+         EditFolderPopup.assetType = "Folder";  
       }
       }
    }
    }
    else if(%itemId == 1)
    else if(%itemId == 1)
@@ -1126,14 +832,14 @@ function AssetBrowserFilterTree::onSelect(%this, %itemId)
       %breadcrumbPath = %this.getItemText(%itemId);
       %breadcrumbPath = %this.getItemText(%itemId);
       
       
    if(%breadcrumbPath $= "")
    if(%breadcrumbPath $= "")
-      %breadcrumbPath = AssetBrowser.currentAddress;
+      %breadcrumbPath = AssetBrowser.dirHandler.currentAddress;
       
       
    AssetBrowser.navigateTo(%breadcrumbPath);
    AssetBrowser.navigateTo(%breadcrumbPath);
 }
 }
 
 
 function AssetBrowser::rebuildAssetArray(%this)
 function AssetBrowser::rebuildAssetArray(%this)
 {
 {
-   %breadcrumbPath = AssetBrowser.currentAddress;
+   %breadcrumbPath = AssetBrowser.dirHandler.currentAddress;
    
    
    // we have to empty out the list; so when we create new guicontrols, these dont linger
    // we have to empty out the list; so when we create new guicontrols, these dont linger
    AssetBrowser-->assetList.deleteAllObjects();
    AssetBrowser-->assetList.deleteAllObjects();
@@ -1329,7 +1035,7 @@ function AssetBrowserFolderSearchFilter::onReturn( %this )
    if( %text $= "" )
    if( %text $= "" )
       %this.reset();
       %this.reset();
    
    
-   AssetBrowser.loadFilters();
+   AssetBrowser.refresh();
 }
 }
 
 
 function AssetBrowserSearchFilter::onReturn( %this )
 function AssetBrowserSearchFilter::onReturn( %this )
@@ -1345,7 +1051,7 @@ function AssetBrowserFolderSearchFilter::reset( %this )
 {
 {
    %this.setText( "Search Folders..." );
    %this.setText( "Search Folders..." );
    
    
-   AssetBrowser.loadFilters();
+   AssetBrowser.refresh();
 }
 }
 
 
 function AssetBrowserSearchFilter::reset( %this )
 function AssetBrowserSearchFilter::reset( %this )
@@ -1364,15 +1070,64 @@ function AssetBrowser_ClearAssetFilterBtn::onClick( %this )
 {
 {
    AssetBrowserSearchFilter.reset();
    AssetBrowserSearchFilter.reset();
 }
 }
+
 //
 //
 //
 //
 // Navigation
 // Navigation
 function AssetBrowser::navigateTo(%this, %address, %historyNav)
 function AssetBrowser::navigateTo(%this, %address, %historyNav)
 {
 {
    //Don't bother navigating if it's to the place we already are
    //Don't bother navigating if it's to the place we already are
-   if(AssetBrowser.currentAddress $= %address)
-      return;
+   if(AssetBrowser.dirHandler.currentAddress !$= %address)
+   {
+      AssetBrowser.dirHandler.navigateTo(%address, %historyNav);
+         
+      %this.updateNavigationBreadcrumb(%address);
+      
+      %module = AssetBrowser.dirHandler.getModuleFromAddress(%address);
+      if(%module !$= "")
+      {
+         //legit module, so set it as current target
+         AssetBrowser.SelectedModule = %module.moduleId;
+      }
+   }
+   
+   %this.rebuildAssetArray();
+}
+
+function AssetBrowser::navigateHistoryForward(%this)
+{
+   %this.dirHandler.navigateHistoryForward();
+   
+   %this.updateNavigationBreadcrumb();
+   
+   %module = AssetBrowser.dirHandler.getModuleFromAddress(%address);
+   if(%module !$= "")
+   {
+      //legit module, so set it as current target
+      AssetBrowser.SelectedModule = %module.moduleId;
+   }
+   
+   %this.rebuildAssetArray();
+}
+
+function AssetBrowser::navigateHistoryBack(%this)
+{
+   %this.dirHandler.navigateHistoryBack();
       
       
+   %this.updateNavigationBreadcrumb();
+   
+   %module = AssetBrowser.dirHandler.getModuleFromAddress(%address);
+   if(%module !$= "")
+   {
+      //legit module, so set it as current target
+      AssetBrowser.SelectedModule = %module.moduleId;
+   }
+   
+   %this.rebuildAssetArray();
+}
+
+function AssetBrowser::updateNavigationBreadcrumb(%this, %address)
+{
    //clear the breadcrumb bar
    //clear the breadcrumb bar
    AssetBrowser_BreadcrumbBar.clear();
    AssetBrowser_BreadcrumbBar.clear();
    
    
@@ -1411,80 +1166,24 @@ function AssetBrowser::navigateTo(%this, %address, %historyNav)
       }
       }
    }
    }
 
 
-   //find our folder tree and action on it tree
-   %folderId = AssetBrowser.getFolderTreeItemFromAddress(%address);
-   
-   %oldAddress = AssetBrowser.currentAddress;   
-   AssetBrowser.currentAddress = %address;
-   AssetBrowser.selectedItem = %folderId;
-   
-   AssetBrowser-->filterTree.clearSelection();
-   AssetBrowser-->filterTree.selectItem(%folderId);
-   
-   //remove any history records that are 'newer' than this one
-   if(%historyNav $= "")
-   {
-      AssetBrowser_NavForeHistoryList.empty();  
-      
-      if(%oldAddress !$= "") 
-         AssetBrowser_NavPrevHistoryList.push_front(%oldAddress);
-   }
-   
    //refresh the nav buttons to display the history
    //refresh the nav buttons to display the history
    %backButtonHistory = "";
    %backButtonHistory = "";
-   for(%i=0; %i < AssetBrowser_NavPrevHistoryList.Count(); %i++)
+   for(%i=0; %i < AssetBrowser.dirHandler.prevHistoryList.Count(); %i++)
    {
    {
-      %prevAddress = AssetBrowser_NavPrevHistoryList.getKey(%i);
+      %prevAddress = AssetBrowser.dirHandler.prevHistoryList.getKey(%i);
       %backButtonHistory = %i==0 ? %prevAddress @ "\n" : %backButtonHistory @ %prevAddress @ "\n";
       %backButtonHistory = %i==0 ? %prevAddress @ "\n" : %backButtonHistory @ %prevAddress @ "\n";
    }
    }
    
    
    AssetBrowser_NavigateBackBtn.tooltip = %backButtonHistory;
    AssetBrowser_NavigateBackBtn.tooltip = %backButtonHistory;
    
    
    %foreButtonHistory = "";
    %foreButtonHistory = "";
-   for(%i=0; %i < AssetBrowser_NavForeHistoryList.Count(); %i++)
+   for(%i=0; %i < AssetBrowser.dirHandler.foreHistoryList.Count(); %i++)
    {
    {
-      %prevAddress = AssetBrowser_NavForeHistoryList.getKey(%i);
+      %prevAddress = AssetBrowser.dirHandler.foreHistoryList.getKey(%i);
       %foreButtonHistory = %i==0 ? %prevAddress @ "\n" : %foreButtonHistory @ %prevAddress @ "\n";
       %foreButtonHistory = %i==0 ? %prevAddress @ "\n" : %foreButtonHistory @ %prevAddress @ "\n";
    }
    }
    
    
    AssetBrowser_NavigateForwardBtn.tooltip = %foreButtonHistory;
    AssetBrowser_NavigateForwardBtn.tooltip = %foreButtonHistory;
-   
-   %module = AssetBrowser.getModuleFromAddress(%address);
-   if(%module !$= "")
-   {
-      //legit module, so set it as current target
-      AssetBrowser.SelectedModule = %module.moduleId;
-   }
-   
-   %this.rebuildAssetArray();
-}
-
-function AssetBrowser::navigateHistoryForward(%this)
-{
-   if(AssetBrowser_NavForeHistoryList.count() == 0)
-      return;
-      
-   %newAddress = AssetBrowser_NavForeHistoryList.getKey(0);
-   %prevHistory = AssetBrowser.currentAddress;
-      
-   AssetBrowser_NavPrevHistoryList.push_front(%prevHistory);
-   AssetBrowser_NavForeHistoryList.pop_front();
-   
-   %this.navigateTo(%newAddress, true);
-}
-
-function AssetBrowser::navigateHistoryBack(%this)
-{
-   if(AssetBrowser_NavPrevHistoryList.count() == 0)
-      return;
-      
-   %newAddress = AssetBrowser_NavPrevHistoryList.getKey(0);
-   %foreHistory = AssetBrowser.currentAddress;
-      
-   AssetBrowser_NavForeHistoryList.push_front(%foreHistory);
-   AssetBrowser_NavPrevHistoryList.pop_front();
-   
-   %this.navigateTo(%newAddress, true);
 }
 }
 
 
 //
 //
@@ -1519,88 +1218,6 @@ function AssetBrowser::reloadModules(%this)
    //ModuleDatabase.loadGroup("Game");
    //ModuleDatabase.loadGroup("Game");
 }
 }
 
 
-function AssetBrowser::getModuleFromAddress(%this, %address)
-{
-   //break down the address
-   %folderCount = getTokenCount(%address, "/");
-      
-   for(%f=0; %f < %folderCount; %f++)
-   {
-      %folderName = getToken(%address, "/", %f);
-
-      %module = ModuleDatabase.findModule(%folderName);
-      if(%module !$= "")
-         return %module;
-   }
-   
-   return "";
-}
-
-//AssetBrowser.getFolderTreeItemFromAddress(AssetBrowser.currentAddress);
-function AssetBrowser::getFolderTreeItemFromAddress(%this, %address)
-{
-   //break down the address
-   %folderCount = getTokenCount(%address, "/");
-
-   %curItem = 0;
-   %rebuiltPath = "";
-   for(%f=0; %f < %folderCount; %f++)
-   {
-      %folderName = getToken(%address, "/", %f);
-      %curItem = AssetBrowser-->filterTree.findChildItemByName(%curItem, %folderName);
-   }
-   
-   return %curItem;
-}
-
-function AssetBrowser::expandTreeToAddress(%this, %address)
-{
-   //break down the address
-   %folderCount = getTokenCount(%address, "/");
-   AssetBrowser-->filterTree.expandItem(0);
-
-   %curItem = 0;
-   %rebuiltPath = "";
-   for(%f=0; %f < %folderCount; %f++)
-   {
-      %folderName = getToken(%address, "/", %f);
-      %curItem = AssetBrowser-->filterTree.findChildItemByName(%curItem, %folderName);
-      AssetBrowser-->filterTree.expandItem(%curItem);
-   }
-}
-//
-//
-//
-function AssetBrowser::createNewFolder(%this)
-{
-   %newFolderIdx = "";
-   %matched = true;
-   %newFolderPath = "";
-   while(%matched == true)
-   {
-      %newFolderPath = AssetBrowser.currentAddress @ "/NewFolder" @ %newFolderIdx;
-      if(!isDirectory(%newFolderPath))
-      {
-         %matched = false;
-      }
-      else
-      {
-         %newFolderIdx++;         
-      }
-   }
-   
-   //make a dummy file
-   %file = new FileObject();
-   %file.openForWrite(%newFolderPath @ "/test");
-   %file.close();
-   
-   fileDelete(%newFolderPath @ "/test");
-   
-   //refresh the directory
-   %this.loadFilters();
-   %this.rebuildAssetArray();
-}
-
 //
 //
 //
 //
 //
 //
@@ -1749,7 +1366,14 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
    %module = %payload.dragSourceControl.parentGroup.moduleName;
    %module = %payload.dragSourceControl.parentGroup.moduleName;
    %asset = %payload.dragSourceControl.parentGroup.assetName;
    %asset = %payload.dragSourceControl.parentGroup.assetName;
    
    
-   if(%assetType $= "ImageAsset")
+   if(AssetBrowser.isMethod("on" @ %assetType @ "EditorDropped"))
+   {
+      %assetDef = AssetDatabase.acquireAsset(%module @ ":" @ %asset);
+      %buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %assetDef @ ",\"" @ %position @ "\");";
+      eval(%buildCommand);
+   }
+   
+   /*if(%assetType $= "ImageAsset")
    {
    {
       echo("WorldEditor::onControlDropped - dropped an ImageAsset onto the editor window. Todo: Implement dropping image/material into scene");  
       echo("WorldEditor::onControlDropped - dropped an ImageAsset onto the editor window. Todo: Implement dropping image/material into scene");  
    }
    }
@@ -1766,7 +1390,7 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
       
       
       %newEntity.dirtyGameObject = true; //because if we're specifically setting the mesh asset, it's dirty*/
       %newEntity.dirtyGameObject = true; //because if we're specifically setting the mesh asset, it's dirty*/
       
       
-      %newEntity = new TSStatic()
+      /*%newEntity = new TSStatic()
       {
       {
          position = %pos;
          position = %pos;
          shapeAsset = %module @ ":" @ %asset;
          shapeAsset = %module @ ":" @ %asset;
@@ -1820,7 +1444,7 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
       
       
       EWorldEditor.clearSelection();
       EWorldEditor.clearSelection();
       EWorldEditor.selectObject(%newEntity);
       EWorldEditor.selectObject(%newEntity);
-   }
+   }*/
    
    
    EWorldEditor.isDirty = true;
    EWorldEditor.isDirty = true;
 }
 }
@@ -1850,7 +1474,7 @@ function AssetBrowserFilterTree::onControlDropped( %this, %payload, %position )
       %path = %this.getItemValue(%item) @ "/" @ %this.getItemText(%item);
       %path = %this.getItemValue(%item) @ "/" @ %this.getItemText(%item);
       echo("DROPPED IT ON PATH " @ %path);  
       echo("DROPPED IT ON PATH " @ %path);  
       
       
-      if(%path !$= AssetBrowser.CurrentAddress)
+      if(%path !$= AssetBrowser.dirHandler.CurrentAddress)
       {
       {
          //we're trying to move the asset to a different module!
          //we're trying to move the asset to a different module!
          MessageBoxYesNo( "Move Asset", "Do you wish to move asset " @ %assetName @ " to " @ %path @ "?", 
          MessageBoxYesNo( "Move Asset", "Do you wish to move asset " @ %assetName @ " to " @ %path @ "?", 

+ 188 - 199
Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs

@@ -203,10 +203,10 @@ function AssetBrowser::onEndDropFiles( %this )
       MessageBoxOK( "Warning", "No base import config. Please create an import configuration set to simplify asset importing.");
       MessageBoxOK( "Warning", "No base import config. Please create an import configuration set to simplify asset importing.");
    }
    }
 }
 }
+
 //
 //
 //
 //
 //
 //
-
 function AssetBrowser::reloadImportingFiles(%this)
 function AssetBrowser::reloadImportingFiles(%this)
 {
 {
    //Effectively, we re-import the files we were trying to originally. We'd only usually do this in the event we change our import config
    //Effectively, we re-import the files we were trying to originally. We'd only usually do this in the event we change our import config
@@ -423,6 +423,17 @@ function ImportAssetWindow::onWake(%this)
    {
    {
       %this.assetValidationList = new ArrayObject();
       %this.assetValidationList = new ArrayObject();
    }
    }
+   
+   AssetImportCtrl-->NewAssetsTree.buildIconTable( ":tools/classIcons/TSStatic:tools/classIcons/TSStatic" @
+                                             ":tools/classIcons/material:tools/classIcons/material"@
+                                             ":tools/classIcons/GuiBitmapCtrl:tools/classIcons/GuiBitmapCtrl"@
+                                             ":tools/classIcons/SFXEmitter:tools/classIcons/SFXEmitter"@
+                                             ":tools/gui/images/iconWarn:tools/gui/images/iconWarn"@
+                                             ":tools/gui/images/iconError:tools/gui/images/iconError");
+   
+   AssetImportTargetAddress.text = AssetBrowser.dirHandler.currentAddress;
+   AssetImportTargetModule.text = AssetBrowser.dirHandler.getModuleFromAddress(AssetBrowser.dirHandler.currentAddress).ModuleId;
+   ImportAssetConfigList.setSelected(0);
 }
 }
 
 
 function ImportAssetWindow::reloadImportOptionConfigs(%this)
 function ImportAssetWindow::reloadImportOptionConfigs(%this)
@@ -466,69 +477,15 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
    if(%importConfigIdx $= "")
    if(%importConfigIdx $= "")
       %importConfigIdx = 0;
       %importConfigIdx = 0;
       
       
-   ImportAssetConfigList.setSelected(%importConfigIdx);
+   //ImportAssetConfigList.setSelected(%importConfigIdx);
 }
 }
 
 
-function ImportAssetWindow::setImportOptions(%this, %configName)
+//
+function assetImportUpdatePath(%newPath)
 {
 {
-   //Todo, editor + load from files for preconfigs
-   
-   //General
-   %optionsObj.treatWarningsAsErrors = false;
-   %optionsObj.ignoreDuplicateAssets = false;
-   
-   //Meshes
-   %optionsObj.ImportMesh = true;
-   %optionsObj.UpAxisOverride = "Z_AXIS";
-   %optionsObj.OverrideScale = 1.0;
-   %optionsObj.IgnoreNodeScale = false;
-   %optionsObj.AdjustCenter = false;
-   %optionsObj.AdjustFloor = false;
-   %optionsObj.CollapseSubmeshes = false;
-   %optionsObj.LODType = "TrailingNumber";
-   %optionsObj.TrailingNumber = 2;
-   %optionsObj.ImportedNodes = "";
-   %optionsObj.IgnoreNodes = "";
-   %optionsObj.ImportMeshes = "";
-   %optionsObj.IgnoreMeshes = "";
-   
-   //Materials
-   %optionsObj.ImportMaterials = true;
-   %optionsObj.CreateComposites = true;
-   
-   //Animations
-   %optionsObj.ImportAnimations = true;
-   %optionsObj.SeparateAnimations = true;
-   %optionsObj.SeparateAnimationPrefix = "";
-   
-   //Collision
-   %optionsObj.GenerateCollisions = true;
-   %optionsObj.GenCollisionType = "CollisionMesh";
-   %optionsObj.CollisionMeshPrefix = "Collision";
-   %optionsObj.GenerateLOSCollisions = true;
-   %optionsObj.GenLOSCollisionType = "CollisionMesh";
-   %optionsObj.LOSCollisionMeshPrefix = "LOS";
-   
-   //Images
-   %optionsObj.ImageType = "Diffuse";
-   %optionsObj.DiffuseTypeSuffixes = "_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL";
-   %optionsObj.NormalTypeSuffixes = "_NORMAL,_NORM";
-   %optionsObj.SpecularTypeSuffixes = "_SPECULAR,_SPEC";
-   %optionsObj.MetalnessTypeSuffixes = "_METAL,_MET,_METALNESS,_METALLIC";
-   %optionsObj.RoughnessTypeSuffixes = "_ROUGH,_ROUGHNESS";
-   %optionsObj.SmoothnessTypeSuffixes = "_SMOOTH,_SMOOTHNESS";
-   %optionsObj.AOTypeSuffixes = "_AO,_AMBIENT,_AMBIENTOCCLUSION";
-   %optionsObj.CompositeTypeSuffixes = "_COMP,_COMPOSITE";
-   %optionsObj.TextureFilteringMode = "Bilinear";
-   %optionsObj.UseMips = true;
-   %optionsObj.IsHDR = false;
-   %optionsObj.Scaling = 1.0;
-   %optionsObj.Compressed = true;
-   
-   //Sounds
-   %optionsObj.VolumeAdjust = 1.0;
-   %optionsObj.PitchAdjust = 1.0;
-   %optionsObj.Compressed = false;
+   AssetBrowser.navigateTo(%newPath);
+   AssetImportTargetAddress.text = %newPath;
+   AssetImportTargetModule.text = AssetBrowser.dirHandler.getModuleFromAddress(AssetBrowser.dirHandler.currentAddress).ModuleId;
 }
 }
 
 
 //
 //
@@ -818,11 +775,15 @@ function ImportAssetWindow::refresh(%this)
    
    
    %this.processNewImportAssets(%id);
    %this.processNewImportAssets(%id);
    
    
-   %this.indentCount = 0;
+   %this.ImportingAssets = 0;
+   %this.FetchedAssets = 0;
+   %this.prunedDuplicateAssets = 0;
+   %this.autoRenamedAssets = 0;
    
    
    %this.validateAssets();
    %this.validateAssets();
    
    
-   ImportingAssetList.clear();
+   AssetImportCtrl-->NewAssetsTree.clear();
+   AssetImportCtrl-->NewAssetsTree.insertItem(0, "Importing Assets");
    
    
    if(AssetBrowser.importAssetUnprocessedListArray.count() == 0)
    if(AssetBrowser.importAssetUnprocessedListArray.count() == 0)
    {
    {
@@ -838,6 +799,31 @@ function ImportAssetWindow::refresh(%this)
       //Continue processing
       //Continue processing
       %this.refresh();  
       %this.refresh();  
    }
    }
+   
+   AssetImportCtrl-->NewAssetsTree.buildVisibleTree(true);
+   
+   %ImportActionSummary = "";
+   
+   if(%this.ImportingAssets != 0)
+   {
+      %ImportActionSummary = %ImportActionSummary SPC %this.ImportingAssets @ " Imported|";
+   }
+   if(%this.FetchedAssets != 0)
+   {
+      %ImportActionSummary = %ImportActionSummary SPC %this.FetchedAssets @ " Fetched|";
+   }
+   if(%this.prunedDuplicateAssets != 0)
+   {
+      %ImportActionSummary = %ImportActionSummary SPC %this.prunedDuplicateAssets @ " Duplicates Pruned|";
+   }
+   if(%this.autoRenamedAssets != 0)
+   {
+      %ImportActionSummary = %ImportActionSummary SPC %this.autoRenamedAssets @ " Auto Renamed|";
+   }
+   
+   warn(%ImportActionSummary);
+   
+   AssetImportSummarization.Text = %ImportActionSummary;
 }
 }
 
 
 function ImportAssetWindow::refreshChildItem(%this, %id)
 function ImportAssetWindow::refreshChildItem(%this, %id)
@@ -859,43 +845,35 @@ function ImportAssetWindow::refreshChildItem(%this, %id)
       //Once validated, attempt any fixes for issues
       //Once validated, attempt any fixes for issues
       %this.resolveIssue(%assetItem);
       %this.resolveIssue(%assetItem);
       
       
-      //Make sure we size correctly
-      ImportingAssetList.extent.x = ImportingAssetList.getParent().extent.x - 15;
-      
       //create!
       //create!
-      %width = mRound(mRound(ImportingAssetList.extent.x) / 2);
-      %height = 20;
-      %indent = %this.indentCount * 16;
       %toolTip = "";
       %toolTip = "";
-      
-      %iconPath = "tools/gui/images/iconInformation";
       %configCommand = "ImportAssetOptionsWindow.editImportSettings(" @ %assetItem @ ");";
       %configCommand = "ImportAssetOptionsWindow.editImportSettings(" @ %assetItem @ ");";
       
       
       if(%assetType $= "Model" || %assetType $= "Animation" || %assetType $= "Image" || %assetType $= "Sound")
       if(%assetType $= "Model" || %assetType $= "Animation" || %assetType $= "Image" || %assetType $= "Sound")
       {
       {
          if(%assetItem.status $= "Error")
          if(%assetItem.status $= "Error")
          {
          {
-            %iconPath = "tools/gui/images/iconError";
+            %iconIdx = 11;
          }
          }
          else if(%assetItem.status $= "Warning")
          else if(%assetItem.status $= "Warning")
          {
          {
-            %iconPath = "tools/gui/images/iconWarn";
+            %iconIdx = 9;
          }
          }
          
          
          %configCommand = "ImportAssetOptionsWindow.fixIssues(" @ %assetItem @ ");";
          %configCommand = "ImportAssetOptionsWindow.fixIssues(" @ %assetItem @ ");";
             
             
-            if(%assetItem.statusType $= "DuplicateAsset" || %assetItem.statusType $= "DuplicateImportAsset")
-               %assetName = %assetItem.assetName @ " <Duplicate Asset>";
+         if(%assetItem.statusType $= "DuplicateAsset" || %assetItem.statusType $= "DuplicateImportAsset")
+            %assetName = %assetItem.assetName @ " <Duplicate Asset>";
       }
       }
       else
       else
       {
       {
          if(%assetItem.status $= "Error")
          if(%assetItem.status $= "Error")
          {
          {
-            %iconPath = "tools/gui/images/iconError";
+            %iconIdx = 11;
          }
          }
          else if(%assetItem.status $= "Warning")
          else if(%assetItem.status $= "Warning")
          {
          {
-            %iconPath = "tools/gui/images/iconWarn";
+            %iconIdx = 9;
          }
          }
          
          
          %configCommand = "";//"ImportAssetOptionsWindow.fixIssues(" @ %assetItem @ ");";
          %configCommand = "";//"ImportAssetOptionsWindow.fixIssues(" @ %assetItem @ ");";
@@ -905,128 +883,26 @@ function ImportAssetWindow::refreshChildItem(%this, %id)
       }
       }
       
       
       %toolTip = %assetItem.statusInfo;
       %toolTip = %assetItem.statusInfo;
+      %parentItem = ImportAssetTree.getParentItem(%id);
       
       
-      %inputCellPos = %indent;
-      %inputCellWidth = (ImportingAssetList.extent.x * 0.3) - %indent;
-      
-      %filePathBtnPos = %inputCellPos + %inputCellWidth - %height;
-      
-      %assetNameCellPos = %inputCellPos + %inputCellWidth;
-      %assetNameCellWidth = ImportingAssetList.extent.x * 0.3;
-      
-      %assetTypeCellPos = %assetNameCellPos + %assetNameCellWidth;
-      %assetTypeCellWidth = ImportingAssetList.extent.x * 0.3;
-      
-      %configBtnPos = %assetTypeCellPos + %assetTypeCellWidth - (%height * 2);
-      %configBtnWidth = %height;
-      
-      %delBtnPos = %assetTypeCellPos + %assetTypeCellWidth - %height;
-      %delBtnWidth = %height;
-      
-      %inputField = %filePath;
-      
-      //Check if it's a generated type, like materials
-      %inputPathProfile = ToolsGuiTextEditProfile;
-      %generatedField = false;
-      if(%assetItem.generatedAsset)
-      {
-         %generatedField = true;
-         %inputField = "(Generated)";
-      }
-      else
+      if(%assetItem.status $= "")
       {
       {
-         //nope, so check that it's a valid file path. If not, flag it as such
-         if(%assetItem.status $= "Error")
-         {
-            if(!isFile(%filePath))
-            {
-               %inputField = "File not found!";
-               %inputPathProfile = ToolsGuiTextEditErrorProfile;
-            }
-         }
+         if(%assetType $= "Model")
+            %iconIdx = 1;
+         else if(%assetType $= "Material")
+            %iconIdx = 3;
+         else if(%assetType $= "Image")
+            %iconIdx = 5;
+         else if(%assetType $= "Sound")
+            %iconIdx = 7;
       }
       }
-      
-      %importEntry = new GuiControl()
-      {
-         position = "0 0";
-         extent = ImportingAssetList.extent.x SPC %height;
-         horzSizing = "width";
-         vertSizing = "bottom";
-         
-         new GuiTextEditCtrl()
-         {
-            Text = %inputField; 
-            position = %inputCellPos SPC "0";
-            extent = %inputCellWidth SPC %height;
-            internalName = "InputPath";
-            active = false;
-            profile = %inputPathProfile;
-            horzSizing = "width";
-            vertSizing = "bottom";
-         };
          
          
-         new GuiButtonCtrl()
-         {
-            position = %filePathBtnPos SPC "0";
-            extent = %height SPC %height;
-            command = "ImportAssetWindow.findMissingFile(" @ %assetItem @ ");";
-            text = "...";
-            internalName = "InputPathButton";
-            tooltip = %toolTip;
-            visible = !%generatedField;
-            horzSizing = "width";
-            vertSizing = "bottom";
-         };
-         
-         new GuiTextEditCtrl()
-         {
-           Text = %assetName; 
-           position = %assetNameCellPos SPC "0";
-           extent = %assetNameCellWidth SPC %height;
-           internalName = "AssetName";
-           horzSizing = "width";
-            vertSizing = "bottom";
-         };
-         
-         new GuiTextEditCtrl()
-         {
-           Text = %assetType; 
-           position = %assetTypeCellPos SPC "0";
-           extent = %assetTypeCellWidth SPC %height;
-           active = false;
-           internalName = "AssetType";
-           horzSizing = "width";
-            vertSizing = "bottom";
-         };
-         
-         new GuiBitmapButtonCtrl()
-         {
-            position = %configBtnPos SPC "0";
-            extent = %height SPC %height;
-            command = "ImportAssetWindow.importResolution(" @ %assetItem @ ");";
-            bitmap = %iconPath;
-            tooltip = %toolTip;
-            horzSizing = "width";
-            vertSizing = "bottom";
-         };
-         new GuiBitmapButtonCtrl()
-         {
-            position = %delBtnPos SPC "0";
-            extent = %height SPC %height;
-            command = "ImportAssetWindow.deleteImportingAsset(" @ %assetItem @ ");";
-            bitmap = "tools/gui/images/iconDelete";
-            horzSizing = "width";
-            vertSizing = "bottom";
-         };
-      };
+      AssetImportCtrl-->NewAssetsTree.insertItem(%parentItem, %assetName, %assetItem, "", %iconIdx, %iconIdx+1);
       
       
-      ImportingAssetList.add(%importEntry);
       AssetBrowser.importAssetFinalListArray.add(%assetItem);
       AssetBrowser.importAssetFinalListArray.add(%assetItem);
       
       
       if(ImportAssetTree.isParentItem(%id))
       if(ImportAssetTree.isParentItem(%id))
       {
       {
-         %this.indentCount++;  
-         
          %childItem = ImportAssetTree.getChild(%id);
          %childItem = ImportAssetTree.getChild(%id);
          
          
          //recurse!
          //recurse!
@@ -1035,11 +911,123 @@ function ImportAssetWindow::refreshChildItem(%this, %id)
 
 
       %id = ImportAssetTree.getNextSibling(%id);
       %id = ImportAssetTree.getNextSibling(%id);
    }
    }
+}
+
+//
+function NewAssetsViewTree::onSelect(%this, %itemId)
+{
+	if(%itemId == 1)
+		//can't select root
+		return;
+		
+   %assetItem = %this.getItemValue(%itemId);
+   
+   AssetImportCtrl-->NewAssetsInspector.clearFields();
+   
+   AssetImportCtrl-->NewAssetsInspector.startGroup("General");
+   AssetImportCtrl-->NewAssetsInspector.addField("assetName", "Asset Name", "string", "", %assetItem.assetName, "", %assetItem);
+   AssetImportCtrl-->NewAssetsInspector.addField("assetType", "Asset Type", "string", "", %assetItem.assetType, "", %assetItem);
+   
+   if(!%assetItem.generatedAsset)
+      AssetImportCtrl-->NewAssetsInspector.addField("filePath", "File Path", "fileName", "", %assetItem.filePath, "", %assetItem);
+   
+   //AssetImportCtrl-->NewAssetsInspector.addField("assetName", "Asset Name", "string", "", %assetItem.assetName, "", %assetItem);
+   //AssetImportCtrl-->NewAssetsInspector.addField("assetName", "Asset Name", "string", "", %assetItem.assetName, "", %assetItem);
+   
+   AssetImportCtrl-->NewAssetsInspector.addField("status", "Status", "string", "", %assetItem.status, "", %assetItem);
+   AssetImportCtrl-->NewAssetsInspector.endGroup();
+   
+   AssetImportCtrl-->NewAssetsInspector.setFieldEnabled("assetType", false);
+   //AssetImportCtrl-->NewAssetsInspector.setFieldEnabled("status", false);
+   
+   /*moduleName = %moduleName;
+   dirty  = true;
+   parentAssetItem = %parentAssetItem;
+   status = "";
+   statusType = "";
+   statusInfo = "";
+   skip = false;
+   processed = false;
+   generatedAsset = false;*/
+}
+
+function NewAssetsViewTree::onRightMouseDown(%this, %itemId)
+{
+   ImportAssetActions.enableItem(1, true);
    
    
-   %this.indentCount--;
+   if( %itemId != 1 && %itemId != -1)
+   {
+      ImportAssetActions.showPopup(Canvas);
+      ImportAssetActions.assetItem = %this.getItemValue(%itemId);
+      ImportAssetActions.itemId = %itemId;
+   }
+   else
+   {
+      ImportAssetActions.enableItem(1, false);
+      ImportAssetActions.showPopup(Canvas);
+   }
 }
 }
+
+function NewAssetsPanelInputs::onRightMouseDown(%this)
+{
+   NewAssetsViewTree::onRightMouseDown(0, -1);
+}
+
 //
 //
+function ImportAssetWindow::removeImportingAsset(%this)
+{
+   ImportAssetTree.removeAllChildren(ImportAssetActions.itemId);
+   ImportAssetTree.removeItem(ImportAssetActions.itemId);
+   
+   ImportAssetWindow.refresh();
+}
 
 
+function ImportAssetWindow::addNewImportingAsset(%this)
+{
+   %dlg = new OpenFileDialog()
+   {
+      Filters = "Shape Files(*.dae, *.cached.dts)|*.dae;*.cached.dts|Images Files(*.jpg,*.png,*.tga,*.bmp,*.dds)|*.jpg;*.png;*.tga;*.bmp;*.dds|Any Files (*.*)|*.*|";
+      DefaultFile = "";
+      ChangePath = false;
+      MustExist = true;
+      MultipleFiles = false;
+      forceRelativePath = false;
+   };
+      
+   if ( %dlg.Execute() )
+   {
+      %filePath = %dlg.FileName;
+   }
+   
+   %dlg.delete();
+   
+   //AssetBrowser.onDropFile( %path );
+   
+   %fileExt = fileExt( %filePath );
+   //add it to our array!
+   if(isImageFormat(%fileExt))
+      %type = "Image";
+   else if( isShapeFormat(%fileExt))
+      %type = "Model";
+   else if( isSoundFormat(%fileExt))
+      %type = "Sound";
+   else if( %fileExt $= ".cs" || %fileExt $= ".cs.dso" )
+      %type = "Script";
+   else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" )
+      %type = "GUI";
+      
+   AssetBrowser.addImportingAsset(%type, %filePath, ImportAssetActions.assetItem);
+      
+   //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
+   //ensure we're not doubling-up on files by accident
+   if(%this.importingFilesArray.getIndexFromKey(%filePath) == -1)
+      %this.importingFilesArray.add(%filePath);
+         
+   AssetBrowser.onEndDropFiles();
+}
+
+//
 function ImportAssetWindow::importResolution(%this, %assetItem)
 function ImportAssetWindow::importResolution(%this, %assetItem)
 {
 {
    if(%assetItem.status !$= "Error" && %assetItem.status !$= "Warning")
    if(%assetItem.status !$= "Error" && %assetItem.status !$= "Warning")
@@ -1086,8 +1074,7 @@ function ImportAssetWindow::validateAssets(%this)
 
 
 function ImportAssetWindow::validateAsset(%this, %id)
 function ImportAssetWindow::validateAsset(%this, %id)
 {
 {
-   
-   %moduleName = ImportAssetModuleList.getText();
+   %moduleName = AssetImportTargetModule.getText();
    
    
    while (%id > 0)
    while (%id > 0)
    {
    {
@@ -1201,7 +1188,7 @@ function ImportAssetWindow::resetAssetsValidationStatus(%this)
 
 
 function ImportAssetWindow::resetAssetValidationStatus(%this, %id)
 function ImportAssetWindow::resetAssetValidationStatus(%this, %id)
 {
 {
-   %moduleName = ImportAssetModuleList.getText();
+   %moduleName = AssetImportTargetModule.getText();
   
   
    %id = ImportAssetTree.getChild(%id);
    %id = ImportAssetTree.getChild(%id);
    while (%id > 0)
    while (%id > 0)
@@ -1239,7 +1226,7 @@ function ImportAssetWindow::checkAssetsForCollision(%this, %assetItem)
 
 
 function ImportAssetWindow::checkAssetForCollision(%this, %assetItem, %id)
 function ImportAssetWindow::checkAssetForCollision(%this, %assetItem, %id)
 {
 {
-   %moduleName = ImportAssetModuleList.getText();
+   %moduleName = AssetImportTargetModule.getText();
   
   
    %id = ImportAssetTree.getChild(%id);
    %id = ImportAssetTree.getChild(%id);
    while (%id > 0)
    while (%id > 0)
@@ -1288,7 +1275,7 @@ function ImportAssetWindow::deleteImportingAsset(%this, %assetItem)
 
 
    schedule(10, 0, "refreshImportAssetWindow");
    schedule(10, 0, "refreshImportAssetWindow");
    //ImportAssetWindow.refresh();
    //ImportAssetWindow.refresh();
-   ImportAssetOptionsWindow.setVisible(0);
+   //ImportAssetOptionsWindow.setVisible(0);
 }
 }
 
 
 //
 //
@@ -1298,7 +1285,7 @@ function ImportAssetWindow::ImportAssets(%this)
    %assetCount = AssetBrowser.importAssetFinalListArray.count();
    %assetCount = AssetBrowser.importAssetFinalListArray.count();
    
    
    //get the selected module data
    //get the selected module data
-   %moduleName = ImportAssetModuleList.getText();
+   %moduleName = AssetImportTargetModule.getText();
    
    
    %module = ModuleDatabase.findModule(%moduleName, 1);
    %module = ModuleDatabase.findModule(%moduleName, 1);
    
    
@@ -1313,8 +1300,7 @@ function ImportAssetWindow::ImportAssets(%this)
    %this.doImportAssets(%id);
    %this.doImportAssets(%id);
    
    
    //force an update of any and all modules so we have an up-to-date asset list
    //force an update of any and all modules so we have an up-to-date asset list
-   AssetBrowser.loadFilters();
-   AssetBrowser.refreshPreviews();
+   AssetBrowser.refresh();
    Canvas.popDialog(AssetImportCtrl);
    Canvas.popDialog(AssetImportCtrl);
    AssetBrowser.isAssetReImport = false;
    AssetBrowser.isAssetReImport = false;
 }
 }
@@ -1486,6 +1472,7 @@ function ImportAssetWindow::resolveIssue(%this, %assetItem)
       if(%resolutionAction $= "AutoPrune")
       if(%resolutionAction $= "AutoPrune")
       {
       {
          %this.deleteImportingAsset(%assetItem);
          %this.deleteImportingAsset(%assetItem);
+         %this.prunedDuplicateAssets++;
       }
       }
       else if(%resolutionAction $= "AutoRename")
       else if(%resolutionAction $= "AutoRename")
       {
       {
@@ -1501,6 +1488,8 @@ function ImportAssetWindow::resolveIssue(%this, %assetItem)
             %num++;
             %num++;
             %assetItem.assetName = %noNum @ %num; 
             %assetItem.assetName = %noNum @ %num; 
          }
          }
+         
+         %this.autoRenamedAssets++;
       }
       }
    }
    }
    else if(%assetItem.statusType $= "MissingFile")
    else if(%assetItem.statusType $= "MissingFile")

+ 203 - 0
Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.cs

@@ -0,0 +1,203 @@
+function AssetImportConfigEditor::onWake(%this)
+{
+   %this.refresh();
+}
+
+function AssetImportConfigEditor::refresh(%this)
+{
+   AssetImportConfigList.clear();
+   
+   ImportAssetWindow.reloadImportOptionConfigs();
+   setupImportConfigSettingsList();
+   
+   for(%i=0; %i < ImportAssetWindow.importConfigsList.count(); %i++)
+   {
+      %configName = ImportAssetWindow.importConfigsList.getKey(%i);  
+      AssetImportConfigList.addRow(%i, %configName);
+   }
+   
+   if(ESettingsWindow.isAwake())
+      ESettingsWindow.refresh();
+      
+   if(AssetImportCtrl.isAwake())
+      ImportAssetConfigList.setSelected(0);
+}
+
+function AssetImportConfigList::onSelect( %this, %id, %text )
+{
+   ImportOptionsConfigList.clearFields();
+   ImportOptionsConfigList.setAutoUpdate(false); //we don't want to be updating every time we add a field in here
+   
+   %this.currentConfig = %text;
+   
+   %this.populateConfigListByGroup("General");
+   %this.populateConfigListByGroup("Meshes");
+   %this.populateConfigListByGroup("Materials");
+   //%this.populateConfigListByGroup("Animations");
+   //%this.populateConfigListByGroup("Images");
+   //%this.populateConfigListByGroup("Collision");
+   //%this.populateConfigListByGroup("Sound");
+   
+   ImportOptionsConfigList.update();  
+}
+
+function AssetImportConfigList::populateConfigListByGroup(%this, %groupName)
+{
+   AssetImportConfigEditorInspector.startGroup(%groupName);
+   for(%i=0; %i < ImportAssetConfigSettingsList.count(); %i++)
+   {
+      %settingName = getField(ImportAssetConfigSettingsList.getKey(%i),0);
+      if(startsWith(%settingName, %groupName@"/"))
+      {
+         %labelName = getField(ImportAssetConfigSettingsList.getKey(%i), 1);
+         %type = getField(ImportAssetConfigSettingsList.getKey(%i), 2);
+         %tooltip = getField(ImportAssetConfigSettingsList.getKey(%i), 3);
+         
+         %defaultValue = getField(ImportAssetConfigSettingsList.getValue(%i), 0);
+         %dataValues = getField(ImportAssetConfigSettingsList.getValue(%i), 1);
+         AssetImportConfigEditorInspector.addSettingsField(%settingName, %labelName, %type, %tooltip, %defaultValue, %dataValues);
+      }
+   }
+   AssetImportConfigEditorInspector.endGroup();
+}
+
+function AssetImportConfigEditorInspector::addSettingsField(%this, %settingsFieldName, %labelText, %fieldType, %tooltip, %fieldValue, %fieldData)
+{
+   %moddedSettingsFieldName = strreplace(%settingsFieldName, "/", "-");
+   
+   %configGroup = AssetImportConfigList.currentConfig;
+   
+   %value = AssetImportSettings.value(%configGroup @ "/" @ %settingsFieldName);
+   if(%value $= "")
+      %value = %fieldValue;
+      
+   //%this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", %value, %fieldData, %this @ ".changeEditorSetting");
+   %this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", %value, %fieldData, "changeEditorSetting");
+}
+
+function AssetImportConfigEditorInspector::changeEditorSetting(%this, %varName, %value)
+{
+   %varName = strreplace(%varName, "-", "/");
+   
+   echo("Set " @ %varName @ " to be " @ %value);  
+   
+   %configGroup = AssetImportConfigList.currentConfig;
+   
+   %oldValue = AssetImportSettings.value(%configGroup @ "/" @ %varName, %value);
+   
+   AssetImportSettings.setValue(%configGroup @ "/" @ %varName, %value);
+   
+   if(%oldValue !$= %value)
+   {
+      %scollPos = ImportAssetConfigEditorScroll.getScrollPosition();
+      ImportAssetConfigEditorWindow.populateConfigList(ImportAssetWindow.activeImportConfig); 
+      ImportAssetConfigEditorScroll.setScrollPosition(%scollPos.x, %scollPos.y);
+   }
+}
+
+function AssetImportConfigEditorInspector::setDefaultValuesByGroup(%this, %groupName)
+{
+   %configList = ImportAssetConfigSettingsList;
+   
+   for(%i=0; %i < %configList.count(); %i++)
+   {
+      %settingName = getField(%configList.getKey(%i),0);
+      if(startsWith(%settingName, %groupName @ "/"))
+      {
+         %defaultValue = getField(%configList.getValue(%i), 0);
+         AssetImportSettings.setValue(%settingName, %defaultValue);
+      }
+   }
+}
+
+function AssetImportConfigEditorInspector::ToggleImportMesh(%this, %fieldName, %newValue, %ownerObject)
+{
+   %this.setFieldEnabled("DoUpAxisOverride", %newValue);
+   %this.setFieldEnabled("UpAxisOverride", %newValue);
+   %this.setFieldEnabled("DoScaleOverride", %newValue);
+   %this.setFieldEnabled("ScaleOverride", %newValue);
+   %this.setFieldEnabled("IgnoreNodeScale", %newValue);
+   %this.setFieldEnabled("AdjustCenter", %newValue);
+   %this.setFieldEnabled("AdjustFloor", %newValue);
+   %this.setFieldEnabled("CollapseSubmeshes", %newValue);
+   %this.setFieldEnabled("LODType", %newValue);   
+   %this.setFieldEnabled("ImportedNodes", %newValue);
+   %this.setFieldEnabled("IgnoreNodes", %newValue);
+   %this.setFieldEnabled("ImportMeshes", %newValue);
+   %this.setFieldEnabled("IgnoreMeshes", %newValue);
+}
+
+function AssetImportConfigEditor::addNewConfig(%this)
+{
+   //Ensure our list is set up
+   setupImportConfigSettingsList();
+   
+   ImportAssetNewConfigEditorWindow.setVisible(1);
+   ImportAssetNewConfigEditorWindow.selectWindow();
+}
+
+function AssetImportConfigEditor::createNewImportConfig(%this)
+{
+   %configName = AssetImportNewConfigName.getText();
+   %configList = ImportAssetConfigSettingsList;
+   
+   AssetImportSettings.beginGroup(%configName);
+   
+   AssetImportConfigEditorInspector.setDefaultValuesByGroup("General");
+   AssetImportConfigEditorInspector.setDefaultValuesByGroup("Meshes");
+   AssetImportConfigEditorInspector.setDefaultValuesByGroup("Materials");
+   AssetImportConfigEditorInspector.setDefaultValuesByGroup("Animations");
+   AssetImportConfigEditorInspector.setDefaultValuesByGroup("Collision");
+   AssetImportConfigEditorInspector.setDefaultValuesByGroup("Images");
+   AssetImportConfigEditorInspector.setDefaultValuesByGroup("Sounds");
+   
+   AssetImportSettings.endGroup();
+   
+   %success = AssetImportSettings.write();
+   
+   ImportAssetNewConfigEditorWindow.setVisible(0);
+   
+   %this.refresh();
+}
+
+function AssetImportConfigEditor::deleteConfig(%this)
+{
+   %callback = "AssetImportConfigEditor.onDeleteConfig();";
+   MessageBoxOKCancel("Delete Import Config", "This will delete the " @ AssetImportConfigList.currentConfig @ " config. Continue?", %callback, "");
+}
+
+function AssetImportConfigEditor::onDeleteConfig(%this)
+{
+   %configGroup = AssetImportConfigList.currentConfig;
+   
+   AssetImportConfigEditorInspector.removeSettingsByGroup("General");
+   AssetImportConfigEditorInspector.removeSettingsByGroup("Meshes");
+   AssetImportConfigEditorInspector.removeSettingsByGroup("Materials");
+   AssetImportConfigEditorInspector.removeSettingsByGroup("Animations");
+   AssetImportConfigEditorInspector.removeSettingsByGroup("Collision");
+   AssetImportConfigEditorInspector.removeSettingsByGroup("Images");
+   AssetImportConfigEditorInspector.removeSettingsByGroup("Sounds");
+}
+
+function AssetImportConfigEditorInspector::removeSettingsByGroup(%this, %groupName)
+{
+   %configList = ImportAssetConfigSettingsList;
+   
+   %configGroup = AssetImportConfigList.currentConfig;
+   
+   for(%i=0; %i < %configList.count(); %i++)
+   {
+      %settingName = getField(%configList.getKey(%i),0);
+      if(startsWith(%settingName, %groupName @ "/"))
+      {
+         %defaultValue = getField(%configList.getValue(%i), 0);
+         
+         %targetSetting = %configGroup @ "/" @ %settingName;
+         
+         AssetImportSettings.remove(%configGroup @ "/" @ %settingName);
+      }
+   }
+   
+   %success = AssetImportSettings.write();
+   AssetImportConfigEditor.refresh();
+}

+ 7 - 5
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.cs

@@ -3,11 +3,13 @@ function AssetBrowser::createCppAsset(%this)
    %moduleName = AssetBrowser.newAssetSettings.moduleName;
    %moduleName = AssetBrowser.newAssetSettings.moduleName;
    %modulePath = "data/" @ %moduleName;
    %modulePath = "data/" @ %moduleName;
       
       
-   %assetName = AssetBrowser.newAssetSettings.assetName;      
+   %assetName = AssetBrowser.newAssetSettings.assetName;  
    
    
-   %tamlpath = %modulePath @ "/source/" @ %assetName @ ".asset.taml";
-   %codePath = %modulePath @ "/source/" @ %assetName @ ".cpp";
-   %headerPath = %modulePath @ "/source/" @ %assetName @ ".h";
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";     
+   
+   %tamlpath = %assetPath @ %assetName @ ".asset.taml";
+   %codePath = %assetPath @ %assetName @ ".cpp";
+   %headerPath = %assetPath @ %assetName @ ".h";
    
    
    //Do the work here
    //Do the work here
    %assetType = AssetBrowser.newAssetSettings.assetType;
    %assetType = AssetBrowser.newAssetSettings.assetType;
@@ -95,7 +97,7 @@ function AssetBrowser::createCppAsset(%this)
    }
    }
 	
 	
 	//Last, check that we have a C++ Module definition. If not, make one so anything important can be initialized on startup there
 	//Last, check that we have a C++ Module definition. If not, make one so anything important can be initialized on startup there
-	%cppModuleFilePath = %modulePath @ "/source/" @ %moduleName @ ".cpp";
+	%cppModuleFilePath = %modulePath @ "/" @ %moduleName @ ".cpp";
 	if(!isFile(%cppModuleFilePath))
 	if(!isFile(%cppModuleFilePath))
 	{
 	{
 	   %file = new FileObject();
 	   %file = new FileObject();

+ 44 - 2
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.cs

@@ -1,3 +1,45 @@
+function AssetBrowser::createNewFolder(%this)
+{
+   AssetBrowser_newFolderNameTxt.text = "NewFolder";
+   Canvas.pushDialog(AssetBrowser_newFolder);
+}
+
+function AssetBrowser::doCreateNewFolder(%this)
+{
+   %newFolderName = AssetBrowser_newFolderNameTxt.getText();
+   
+   if(%newFolderName $= "")
+      %newFolderName = "NewFolder";
+      
+   %newFolderIdx = "";
+   %matched = true;
+   %newFolderPath = "";
+   while(%matched == true)
+   {
+      %newFolderPath = AssetBrowser.dirHandler.currentAddress @ "/" @ %newFolderName @ %newFolderIdx;
+      if(!isDirectory(%newFolderPath))
+      {
+         %matched = false;
+      }
+      else
+      {
+         %newFolderIdx++;         
+      }
+   }
+   
+   //make a dummy file
+   %file = new FileObject();
+   %file.openForWrite(%newFolderPath @ "/test");
+   %file.close();
+   
+   fileDelete(%newFolderPath @ "/test");
+   
+   //refresh the directory
+   AssetBrowser.loadDirectories();
+   
+   %this.navigateTo(%newFolderPath);
+}
+
 function AssetBrowser::buildFolderPreview(%this, %assetDef, %previewData)
 function AssetBrowser::buildFolderPreview(%this, %assetDef, %previewData)
 {
 {
    %previewData.assetName = %assetDef.assetName;
    %previewData.assetName = %assetDef.assetName;
@@ -26,7 +68,7 @@ function AssetBrowser::renameFolder(%this, %folderPath, %newFolderName)
    //so, we nix any assets active for the module, do the delete action on the old folder, and then re-acquire our assets.
    //so, we nix any assets active for the module, do the delete action on the old folder, and then re-acquire our assets.
    //This will have the added benefit of updating paths for asset items
    //This will have the added benefit of updating paths for asset items
    
    
-   %module = AssetBrowser.getModuleFromAddress(AssetBrowser.currentAddress);
+   %module = AssetBrowser.getModuleFromAddress(AssetBrowser.dirHandler.currentAddress);
    %moduleId = %module.ModuleId;
    %moduleId = %module.ModuleId;
    
    
    AssetDatabase.removeDeclaredAssets(%moduleId);
    AssetDatabase.removeDeclaredAssets(%moduleId);
@@ -41,7 +83,7 @@ function AssetBrowser::deleteFolder(%this, %folderPath)
 {
 {
    doDeleteFolder(%folderPath);
    doDeleteFolder(%folderPath);
    
    
-   %this.loadFilters();
+   %this.loadDirectories();
 }
 }
 
 
 function doDeleteFolder(%folderPath)
 function doDeleteFolder(%folderPath)

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs

@@ -5,7 +5,7 @@ function AssetBrowser::createGUIAsset(%this)
       
       
    %assetName = AssetBrowser.newAssetSettings.assetName;
    %assetName = AssetBrowser.newAssetSettings.assetName;
    
    
-   %assetPath = AssetBrowser.currentAddress @ "/";
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
    
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %guipath = %assetPath @ %assetName @ ".gui";
    %guipath = %assetPath @ %assetName @ ".gui";

+ 2 - 2
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs

@@ -109,7 +109,7 @@ function AssetBrowser::prepareImportImageAsset(%this, %assetItem)
 
 
 function AssetBrowser::importImageAsset(%this, %assetItem)
 function AssetBrowser::importImageAsset(%this, %assetItem)
 {
 {
-   %moduleName = ImportAssetModuleList.getText();
+   %moduleName = AssetImportTargetModule.getText();
    
    
    %assetType = %assetItem.AssetType;
    %assetType = %assetItem.AssetType;
    %filePath = %assetItem.filePath;
    %filePath = %assetItem.filePath;
@@ -117,7 +117,7 @@ function AssetBrowser::importImageAsset(%this, %assetItem)
    %assetImportSuccessful = false;
    %assetImportSuccessful = false;
    %assetId = %moduleName@":"@%assetName;
    %assetId = %moduleName@":"@%assetName;
    
    
-   %assetPath = AssetBrowser.currentAddress @ "/";
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
    
    
    %assetFullPath = %assetPath @ "/" @ fileName(%filePath);
    %assetFullPath = %assetPath @ "/" @ fileName(%filePath);
    
    

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.cs

@@ -5,7 +5,7 @@ function AssetBrowser::createLevelAsset(%this)
    
    
    %assetName = AssetBrowser.newAssetSettings.assetName;
    %assetName = AssetBrowser.newAssetSettings.assetName;
    
    
-   %assetPath = AssetBrowser.currentAddress @ "/";
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
    
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %levelPath = %assetPath @ %assetName @ ".mis";
    %levelPath = %assetPath @ %assetName @ ".mis";

+ 4 - 4
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs

@@ -5,7 +5,7 @@ function AssetBrowser::createMaterialAsset(%this)
    %moduleName = AssetBrowser.newAssetSettings.moduleName;
    %moduleName = AssetBrowser.newAssetSettings.moduleName;
    %modulePath = "data/" @ %moduleName;
    %modulePath = "data/" @ %moduleName;
    
    
-   %assetPath = AssetBrowser.currentAddress @ "/";   
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";   
    
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %sgfPath = %assetPath @ %assetName @ ".sgf";
    %sgfPath = %assetPath @ %assetName @ ".sgf";
@@ -234,7 +234,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
          %assetItem.AOImageAsset.skip = true;
          %assetItem.AOImageAsset.skip = true;
          %assetItem.metalnessImageAsset.skip = true;
          %assetItem.metalnessImageAsset.skip = true;
          
          
-         %compositeAssetPath = AssetBrowser.currentAddress @ "/";
+         %compositeAssetPath = AssetBrowser.dirHandler.currentAddress @ "/";
          %saveAsPath = %compositeAssetPath @ "/" @ %assetItem.assetName @ "_composite.png";
          %saveAsPath = %compositeAssetPath @ "/" @ %assetItem.assetName @ "_composite.png";
          %compositeAsset = AssetBrowser.addImportingAsset("Image", "", %assetItem, %assetItem.assetName @ "_composite");
          %compositeAsset = AssetBrowser.addImportingAsset("Image", "", %assetItem, %assetItem.assetName @ "_composite");
          %compositeAsset.generatedAsset = true;
          %compositeAsset.generatedAsset = true;
@@ -279,7 +279,7 @@ function AssetBrowser::findMaterialMapFileWSuffix(%this, %fileDir, %filename, %f
 
 
 function AssetBrowser::importMaterialAsset(%this, %assetItem)
 function AssetBrowser::importMaterialAsset(%this, %assetItem)
 {
 {
-   %moduleName = ImportAssetModuleList.getText();
+   %moduleName = AssetImportTargetModule.getText();
    
    
    %assetType = %assetItem.AssetType;
    %assetType = %assetItem.AssetType;
    %filePath = %assetItem.filePath;
    %filePath = %assetItem.filePath;
@@ -287,7 +287,7 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem)
    %assetImportSuccessful = false;
    %assetImportSuccessful = false;
    %assetId = %moduleName@":"@%assetName;
    %assetId = %moduleName@":"@%assetName;
    
    
-   %assetPath = AssetBrowser.currentAddress @ "/";
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %sgfPath = %assetPath @ %assetName @ ".sgf";
    %sgfPath = %assetPath @ %assetName @ ".sgf";
    %scriptPath = %assetPath @ %assetName @ ".cs";
    %scriptPath = %assetPath @ %assetName @ ".cs";

+ 1 - 8
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.cs

@@ -5,7 +5,7 @@ function AssetBrowser::createScriptAsset(%this)
       
       
    %assetName = AssetBrowser.newAssetSettings.assetName;  
    %assetName = AssetBrowser.newAssetSettings.assetName;  
    
    
-   %assetPath = AssetBrowser.currentAddress @ "/";    
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";    
    
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %scriptPath = %assetPath @ %assetName @ ".cs";
    %scriptPath = %assetPath @ %assetName @ ".cs";
@@ -21,13 +21,6 @@ function AssetBrowser::createScriptAsset(%this)
    
    
    %moduleDef = ModuleDatabase.findModule(%moduleName, 1);
    %moduleDef = ModuleDatabase.findModule(%moduleName, 1);
 	AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
 	AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
-
-	AssetBrowser.loadFilters();
-	
-	%treeItemId = AssetBrowserFilterTree.findItemByName(%moduleName);
-	%smItem = AssetBrowserFilterTree.findChildItemByName(%treeItemId, "ScriptAsset");
-	
-	AssetBrowserFilterTree.onSelect(%smItem);
 	
 	
 	%file = new FileObject();
 	%file = new FileObject();
    
    

+ 30 - 3
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs

@@ -5,7 +5,7 @@ function AssetBrowser::createShapeAsset(%this)
       
       
    %assetName = AssetBrowser.newAssetSettings.assetName;
    %assetName = AssetBrowser.newAssetSettings.assetName;
    
    
-   %assetPath = AssetBrowser.currentAddress @ "/";
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
    
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %shapeFilePath = %assetPath @ %assetName @ ".dae";
    %shapeFilePath = %assetPath @ %assetName @ ".dae";
@@ -42,6 +42,11 @@ function AssetBrowser::editShapeAsset(%this, %assetDef)
    ShapeEditorPlugin.openShapeAsset(%assetDef);    
    ShapeEditorPlugin.openShapeAsset(%assetDef);    
 }
 }
 
 
+function AssetBrowser::deleteShapeAsset(%this, %assetDef)
+{
+   
+}
+
 function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
 function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
 {
 {
    %fileExt = fileExt(%assetItem.filePath);
    %fileExt = fileExt(%assetItem.filePath);
@@ -166,7 +171,7 @@ function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
 
 
 function AssetBrowser::importShapeAsset(%this, %assetItem)
 function AssetBrowser::importShapeAsset(%this, %assetItem)
 {
 {
-   %moduleName = ImportAssetModuleList.getText();
+   %moduleName = AssetImportTargetModule.getText();
    
    
    %assetType = %assetItem.AssetType;
    %assetType = %assetItem.AssetType;
    %filePath = %assetItem.filePath;
    %filePath = %assetItem.filePath;
@@ -174,7 +179,7 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
    %assetImportSuccessful = false;
    %assetImportSuccessful = false;
    %assetId = %moduleName@":"@%assetName;
    %assetId = %moduleName@":"@%assetName;
    
    
-   %assetPath = AssetBrowser.currentAddress @ "/";
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
    %assetFullPath = %assetPath @ fileName(%filePath);
    %assetFullPath = %assetPath @ fileName(%filePath);
    
    
    %newAsset = new ShapeAsset()
    %newAsset = new ShapeAsset()
@@ -309,6 +314,28 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData)
    %previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef;
    %previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef;
 }
 }
 
 
+function AssetBrowser::onShapeAssetEditorDropped(%this, %assetDef, %position)
+{
+   //echo("DROPPED A SHAPE ON THE EDITOR WINDOW!"); 
+      
+   %assetId = %assetDef.getAssetId();
+      
+   %pos = EWCreatorWindow.getCreateObjectPosition();
+      
+   %newStatic = new TSStatic()
+   {
+      position = %pos;
+      shapeAsset = %assetId;
+   };
+   
+   getScene(0).add(%newStatic);
+   
+   EWorldEditor.clearSelection();
+   EWorldEditor.selectObject(%newStatic);
+   
+   EWorldEditor.isDirty = true;
+}
+
 function GuiInspectorTypeShapeAssetPtr::onControlDropped( %this, %payload, %position )
 function GuiInspectorTypeShapeAssetPtr::onControlDropped( %this, %payload, %position )
 {
 {
    Canvas.popDialog(EditorDragAndDropLayer);
    Canvas.popDialog(EditorDragAndDropLayer);

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs

@@ -6,7 +6,7 @@ function AssetBrowser::createTerrainAsset(%this)
    %assetName = AssetBrowser.newAssetSettings.assetName;      
    %assetName = AssetBrowser.newAssetSettings.assetName;      
    
    
    %assetType = AssetBrowser.newAssetSettings.assetType;
    %assetType = AssetBrowser.newAssetSettings.assetType;
-   %assetPath = AssetBrowser.currentAddress @ "/";   
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";   
    
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %terPath = %assetPath @ %assetName @ ".ter";
    %terPath = %assetPath @ %assetName @ ".ter";

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs

@@ -6,7 +6,7 @@ function AssetBrowser::createTerrainMaterialAsset(%this)
    %assetName = AssetBrowser.newAssetSettings.assetName;      
    %assetName = AssetBrowser.newAssetSettings.assetName;      
    
    
    %assetType = AssetBrowser.newAssetSettings.assetType;
    %assetType = AssetBrowser.newAssetSettings.assetType;
-   %assetPath = AssetBrowser.currentAddress @ "/";    
+   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";    
    
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %scriptPath = %assetPath @ %assetName @ ".cs";
    %scriptPath = %assetPath @ %assetName @ ".cs";

+ 207 - 0
Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.cs

@@ -0,0 +1,207 @@
+function makedirectoryHandler(%targetTree, %folderExclusionList, %searchFilter)
+{
+   %newHandler = new ScriptObject()
+   {
+      class = "directoryHandler";
+   };
+   
+   %newHandler.currentAddress = "";
+   %newHandler.treeCtrl = %targetTree;
+   %newHandler.folderExclusionList = %folderExclusionList;
+   %newHandler.searchFilter = %searchFilter;
+   
+   %newHandler.prevHistoryList = new ArrayObject();
+   %newHandler.foreHistoryList = new ArrayObject();
+   
+   return %newHandler;
+}
+
+function directoryHandler::loadFolders(%this, %path, %parentId)
+{
+   //utilize home dir project setting here
+   %paths = getDirectoryList(%path);
+   for(%i=0; %i < getFieldCount(%paths); %i++)
+   {
+      %childPath = getField(%paths, %i);
+      
+      %folderCount = getTokenCount(%childPath, "/");
+      
+      for(%f=0; %f < %folderCount; %f++)
+      {
+         %folderName = getToken(%childPath, "/", %f);
+         
+         //we don't need to display the shadercache folder
+         if(%parentId == 1 && (%folderName $= "shaderCache" || %folderName $= "cache"))
+            continue;
+         
+         %iconIdx = 3;
+         
+         if(ModuleDatabase.findModule(%folderName) !$= "")
+            %iconIdx = 1;
+         
+         %searchFoldersText = %this.searchFilter;
+         if(%searchFoldersText !$= "Search Folders...")
+         {
+            if(strstr(strlwr(%folderName), strlwr(%searchFoldersText)) != -1)
+            {
+               %folderID = %this.treeCtrl.insertItem(%parentId, %folderName, %path, "", %iconIdx, %iconIdx+1);
+         
+            %this.loadFolders(%path @ "/" @ %folderName, %folderID);  
+            }
+         }
+         else
+         {
+            %folderID = %this.treeCtrl.insertItem(%parentId, %folderName, %path, "", %iconIdx, %iconIdx);
+         
+            %this.loadFolders(%path @ "/" @ %folderName, %folderID);
+         }
+      }
+   }
+}
+
+function directoryHandler::navigateTo(%this, %address, %historyNav, %selectionNav)
+{
+   //Don't bother navigating if it's to the place we already are
+   if(%this.currentAddress $= %address)
+      return;
+      
+   //clear the breadcrumb bar
+   AssetBrowser_BreadcrumbBar.clear();
+   
+   //break down the address
+   %folderCount = getTokenCount(%address, "/");
+      
+   /*%rebuiltPath = "";
+   for(%f=0; %f < %folderCount; %f++)
+   {
+      %folderName = getToken(%address, "/", %f);
+      
+      %rebuiltPath = %f == 0 ? %folderName : %rebuiltPath @ "/" @ %folderName;
+      
+      %folderNavButton = new GuiButtonCtrl()
+      {
+         profile = ToolsGuiButtonProfile;
+         text = %folderName;
+         command = "AssetBrowser.navigateTo(\"" @ %rebuiltPath @ "\");";
+         extent = "100" SPC AssetBrowser_BreadcrumbBar.extent.y;
+      };
+      
+      AssetBrowser_BreadcrumbBar.add(%folderNavButton);
+      
+      if(%f != %folderCount-1)
+      {
+         %folderSpacerButton = new GuiBitmapButtonCtrl()
+         {
+            profile = ToolsGuiButtonProfile;
+            bitmap = "tools/gui/images/rightArrowWhite";
+            bitmapMode = "Centered";
+            extent = "25" SPC AssetBrowser_BreadcrumbBar.extent.y;
+            //command = "AssetBrowser.navigateTo(\"" @ %rebuiltPath @ "\");";
+         };
+         
+         AssetBrowser_BreadcrumbBar.add(%folderSpacerButton);
+      }
+   }*/
+
+   //find our folder tree and action on it tree
+   %folderId = %this.getFolderTreeItemFromAddress(%address);
+   
+   %this.oldAddress = %this.currentAddress;   
+   %this.currentAddress = %address;
+   %this.selectedItem = %folderId;
+   
+   //This lets us update the tree selection if we didn't get here because of that
+   if(%selectionNav $= "")
+   {
+      %this.treeCtrl.clearSelection();
+      %this.treeCtrl.selectItem(%folderId);
+   }
+   
+   //remove any history records that are 'newer' than this one
+   if(%historyNav $= "")
+   {
+      %this.foreHistoryList.empty();  
+      
+      if(%oldAddress !$= "") 
+         %this.prevHistoryList.push_front(%this.oldAddress);
+   }
+   
+   %this.treeCtrl.buildVisibleTree(true);
+}
+
+function directoryHandler::navigateHistoryForward(%this)
+{
+   if(%this.foreHistoryList.count() == 0)
+      return;
+      
+   %newAddress = %this.foreHistoryList.getKey(0);
+   %prevHistory = %this.currentAddress;
+      
+   %this.prevHistoryList.push_front(%prevHistory);
+   %this.foreHistoryList.pop_front();
+   
+   %this.navigateTo(%newAddress, true);
+}
+
+function directoryHandler::navigateHistoryBack(%this)
+{
+   if(%this.prevHistoryList.count() == 0)
+      return;
+      
+   %newAddress = %this.prevHistoryList.getKey(0);
+   %foreHistory = %this.currentAddress;
+      
+   %this.foreHistoryList.push_front(%foreHistory);
+   %this.prevHistoryList.pop_front();
+   
+   %this.navigateTo(%newAddress, true);
+}
+
+function directoryHandler::getModuleFromAddress(%this, %address)
+{
+   //break down the address
+   %folderCount = getTokenCount(%address, "/");
+      
+   for(%f=0; %f < %folderCount; %f++)
+   {
+      %folderName = getToken(%address, "/", %f);
+
+      %module = ModuleDatabase.findModule(%folderName);
+      if(%module !$= "")
+         return %module;
+   }
+   
+   return "";
+}
+
+function directoryHandler::getFolderTreeItemFromAddress(%this, %address)
+{
+   //break down the address
+   %folderCount = getTokenCount(%address, "/");
+
+   %curItem = 0;
+   %rebuiltPath = "";
+   for(%f=0; %f < %folderCount; %f++)
+   {
+      %folderName = getToken(%address, "/", %f);
+      %curItem = %this.treeCtrl.findChildItemByName(%curItem, %folderName);
+   }
+   
+   return %curItem;
+}
+
+function directoryHandler::expandTreeToAddress(%this, %address)
+{
+   //break down the address
+   %folderCount = getTokenCount(%address, "/");
+   %this.treeCtrl.expandItem(0);
+
+   %curItem = 0;
+   %rebuiltPath = "";
+   for(%f=0; %f < %folderCount; %f++)
+   {
+      %folderName = getToken(%address, "/", %f);
+      %curItem = %this.treeCtrl.findChildItemByName(%curItem, %folderName);
+      %this.treeCtrl.expandItem(%curItem);
+   }
+}

+ 17 - 15
Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs

@@ -68,7 +68,7 @@ function AssetBrowser::refreshAsset(%this, %assetId)
    }
    }
    
    
    AssetDatabase.refreshAsset(%assetId);
    AssetDatabase.refreshAsset(%assetId);
-   AssetBrowser.refreshPreviews();
+   %this.refresh();
 }
 }
 
 
 //------------------------------------------------------------
 //------------------------------------------------------------
@@ -129,7 +129,7 @@ function AssetBrowser::performRenameAsset(%this, %originalAssetName, %newName)
    }
    }
    
    
    //Make sure everything is refreshed
    //Make sure everything is refreshed
-   AssetBrowser.loadFilters();
+   %this.refresh();
    
    
    //Update the selection to immediately jump to the new asset
    //Update the selection to immediately jump to the new asset
    AssetBrowser-->filterTree.clearSelection();
    AssetBrowser-->filterTree.clearSelection();
@@ -173,6 +173,8 @@ function AssetBrowser::moveAsset(%this, %assetId, %destination)
          eval(%this @ ".move" @ %assetType @ "(" @ %assetDef @ ",\"" @ %destination @ "\");");
          eval(%this @ ".move" @ %assetType @ "(" @ %assetDef @ ",\"" @ %destination @ "\");");
       }
       }
    }
    }
+   
+   %this.refresh();
 }
 }
 
 
 //------------------------------------------------------------
 //------------------------------------------------------------
@@ -212,30 +214,30 @@ function AssetBrowser::confirmDeleteAsset(%this)
    %currentSelectedItem = AssetBrowserFilterTree.getSelectedItem();
    %currentSelectedItem = AssetBrowserFilterTree.getSelectedItem();
    %currentItemParent = AssetBrowserFilterTree.getParentItem(%currentSelectedItem);
    %currentItemParent = AssetBrowserFilterTree.getParentItem(%currentSelectedItem);
    
    
-   if(EditAssetPopup.assetType $= "Folder")
+   if(EditFolderPopup.visible)
    {
    {
-      //Do any cleanup required given the type
+      if(EditFolderPopup.dirPath !$= "")
+         %folderPath = EditFolderPopup.dirPath;
+      else
+         %folderPath = AssetBrowserFilterTree.getItemValue(%currentSelectedItem) @ "/" @ AssetBrowserFilterTree.getItemText(%currentSelectedItem);
+         
       if(%this.isMethod("deleteFolder"))
       if(%this.isMethod("deleteFolder"))
-         eval(%this @ ".deleteFolder(\""@EditAssetPopup.assetId@"\");");
-   }
+         eval(%this @ ".deleteFolder(\""@%folderPath@"\");");
+   }   
    else
    else
    {
    {
       %assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
       %assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
       %assetType = AssetDatabase.getAssetType(EditAssetPopup.assetType);
       %assetType = AssetDatabase.getAssetType(EditAssetPopup.assetType);
       
       
+      if(!isObject(%assetDef))
+         return;
+      
       //Do any cleanup required given the type
       //Do any cleanup required given the type
       if(%this.isMethod("delete"@%assetType))
       if(%this.isMethod("delete"@%assetType))
          eval(%this @ ".delete"@%assetType@"("@%assetDef@");");
          eval(%this @ ".delete"@%assetType@"("@%assetDef@");");
       
       
-      AssetDatabase.deleteAsset(EditAssetPopup.assetId, false);
+      AssetDatabase.deleteAsset(EditAssetPopup.assetId, true, false);
    }
    }
 
 
-   %this.loadFilters();
-   
-   if(!AssetBrowserFilterTree.selectItem(%currentSelectedItem))
-   {
-      //if it failed, that means we deleted the last item in that category, and we need to do the parent  
-      AssetBrowserFilterTree.selectItem(%currentItemParent);
-      AssetBrowserFilterTree.expandItem(%currentItemParent);
-   }
+   %this.refresh();
 }
 }

+ 3 - 4
Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs

@@ -184,8 +184,6 @@ function CreateNewAsset()
 	%moduleDef = ModuleDatabase.findModule(%moduleName,1);
 	%moduleDef = ModuleDatabase.findModule(%moduleName,1);
 	AssetDatabase.addDeclaredAsset(%moduleDef, %assetFilePath);
 	AssetDatabase.addDeclaredAsset(%moduleDef, %assetFilePath);
 	
 	
-	AssetBrowser.loadFilters();
-	
 	if(AssetBrowser_newAsset.callbackFunc !$= "")
 	if(AssetBrowser_newAsset.callbackFunc !$= "")
 	{
 	{
       %callbackCommand = "" @ AssetBrowser_newAsset.callbackFunc @ "(\"" @ %moduleName @ ":" @ %assetName @ "\");";
       %callbackCommand = "" @ AssetBrowser_newAsset.callbackFunc @ "(\"" @ %moduleName @ ":" @ %assetName @ "\");";
@@ -193,7 +191,7 @@ function CreateNewAsset()
 	}
 	}
 	
 	
 	//Update the selection to immediately jump to the new asset
 	//Update the selection to immediately jump to the new asset
-   AssetBrowser-->filterTree.clearSelection();
+   /*AssetBrowser-->filterTree.clearSelection();
    %ModuleItem = AssetBrowser-->filterTree.findItemByName(%moduleName);
    %ModuleItem = AssetBrowser-->filterTree.findItemByName(%moduleName);
    %assetTypeId = AssetBrowser-->filterTree.findChildItemByName(%ModuleItem, %assetType);
    %assetTypeId = AssetBrowser-->filterTree.findChildItemByName(%ModuleItem, %assetType);
    
    
@@ -202,7 +200,8 @@ function CreateNewAsset()
    %selectedItem = AssetBrowser-->filterTree.getSelectedItem();
    %selectedItem = AssetBrowser-->filterTree.getSelectedItem();
    AssetBrowser-->filterTree.scrollVisibleByObjectId(%selectedItem);
    AssetBrowser-->filterTree.scrollVisibleByObjectId(%selectedItem);
    
    
-   AssetBrowser-->filterTree.buildVisibleTree(); 
+   AssetBrowser-->filterTree.buildVisibleTree(); */
+   AssetBrowser.refresh();
 }
 }
 
 
 function ParentComponentList::onWake(%this)
 function ParentComponentList::onWake(%this)

+ 13 - 0
Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs

@@ -340,6 +340,19 @@ function AssetBrowser::buildPopupMenus(%this)
       };
       };
    }
    }
 
 
+   //
+   //
+   if( !isObject( ImportAssetActions ) )
+   {
+      %this.ImportAssetActions = new PopupMenu( ImportAssetActions )
+      {
+         superClass = "MenuBuilder";
+         class = "EditorWorldMenu";
+         
+         item[0] = "Add asset" TAB "" TAB "ImportAssetWindow.addNewImportingAsset();";
+         item[1] = "Remove asset" TAB "" TAB "ImportAssetWindow.removeImportingAsset();";
+      };
+   }
 }
 }
 
 
 function AddNewScriptAssetPopupMenu::onSelectItem(%this, %id, %text)
 function AddNewScriptAssetPopupMenu::onSelectItem(%this, %id, %text)

+ 47 - 0
Templates/BaseGame/game/tools/assetBrowser/scripts/selectPath.cs

@@ -0,0 +1,47 @@
+function SelectAssetPath::onWake(%this)
+{
+}
+
+//SelectAssetPath.showDialog();
+function SelectAssetPath::showDialog(%this, %startingPath, %callback)
+{
+   if(!isObject(%this.dirHandler))
+      %this.dirHandler = makedirectoryHandler(SelectAssetPath-->folderTree, "Core,Tools,cache,shaderCache", ""); 
+      
+   SelectAssetPath-->folderTree.clear();
+
+   SelectAssetPath-->folderTree.buildIconTable( ":tools/classIcons/Prefab:tools/classIcons/Prefab" @
+                                             ":tools/classIcons/SimSet:tools/classIcons/SimSet");
+      
+   %this.dirHandler.currentPath = %startingPath;
+   %this.callback = %callback;
+   
+   %dataItem = SelectAssetPath-->folderTree.insertItem(0, "Data");
+   %this.dirHandler.loadFolders("Data", %dataItem);
+   
+   Canvas.pushDialog(SelectAssetPath);
+}
+
+function selectAssetPathTree::onSelect(%this, %itemId)
+{
+	if(%itemId == 1)
+		//can't select root
+		return;
+		
+   SelectAssetPath.selectedTreeItem = %itemId;
+}
+
+
+function SelectAssetPath::selectPath(%this)
+{
+   //do callback
+   %selectedId = %this.selectedTreeItem;
+   %selectedPath = %this-->folderTree.getItemValue(%selectedId) @ "/" @ %this-->folderTree.getItemText(%selectedId);
+   
+   if(%this.callback !$= "")
+   {
+      eval( "" @ %this.callback @ "(\"" @ %selectedPath  @ "\");");   
+   }
+   
+   Canvas.popDialog(SelectAssetPath);
+}

二進制
Templates/BaseGame/game/tools/classIcons/material.png


+ 2 - 0
Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs

@@ -459,6 +459,8 @@ function ESettingsWindow::getAssetEditingSettings(%this)
    }
    }
    
    
    SettingsInspector.startGroup("Assets Importing");
    SettingsInspector.startGroup("Assets Importing");
+   SettingsInspector.addField("Edit Asset Configs", "Edit Asset Import Configs", "button", "Open Asset Import Config Editor", "", "Canvas.pushDialog(AssetImportConfigEditor);");
+   SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList); 
    SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList); 
    SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList); 
    SettingsInspector.addSettingsField("Assets/AutoImport", "Automatically Import using default config", "bool", "If on, the asset importing process" @
    SettingsInspector.addSettingsField("Assets/AutoImport", "Automatically Import using default config", "bool", "If on, the asset importing process" @
                                                                                                                         "will attempt to automatically import any inbound assets"@
                                                                                                                         "will attempt to automatically import any inbound assets"@

+ 46 - 0
Templates/BaseGame/game/tools/gui/fieldTypes/buttonField.cs

@@ -0,0 +1,46 @@
+
+function GuiInspectorVariableGroup::buildButtonField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
+{
+   %extent = 200;
+   
+   %fieldCtrl = %this.createInspectorField();
+   
+   %extent = %this.stack.getExtent();
+   
+   %width = mRound(%extent/2);
+   %height = 20;
+   %inset = 10;
+
+   %editControl = new GuiButtonCtrl() {
+      maxPopupHeight = "200";
+      sbUsesNAColor = "0";
+      reverseTextList = "0";
+      bitmapBounds = "16 16";
+      maxLength = "1024";
+      Margin = "0 0 0 0";
+      Padding = "0 0 0 0";
+      AnchorTop = "1";
+      AnchorBottom = "0";
+      AnchorLeft = "1";
+      AnchorRight = "0";
+      isContainer = "0";
+      Profile = "ToolsGuiButtonProfile";
+      HorizSizing = "right";
+      VertSizing = "bottom";
+      Position = %fieldCtrl.edit.position;
+      Extent = %fieldCtrl.edit.extent;
+      MinExtent = "8 2";
+      canSave = "1";
+      Visible = "1";
+      tooltipprofile = "ToolsGuiToolTipProfile";
+      tooltip = %tooltip;
+      text = %fieldName;
+      hovertime = "1000";
+      command = %fieldDataVals;
+   };
+
+   %fieldCtrl.setCaption(%fieldLabel);
+   %fieldCtrl.setEditControl(%editControl);
+
+   %this.addInspectorField(%fieldCtrl);
+}

+ 1 - 0
Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs

@@ -41,3 +41,4 @@ exec("./fieldTypes/assetDependencies.cs");
 exec("./fieldTypes/fieldTypes.cs");
 exec("./fieldTypes/fieldTypes.cs");
 exec("./fieldTypes/listField.cs");
 exec("./fieldTypes/listField.cs");
 exec("./fieldTypes/moduleDependencies.cs");
 exec("./fieldTypes/moduleDependencies.cs");
+exec("./fieldTypes/buttonField.cs");

二進制
Templates/BaseGame/game/tools/gui/images/window.png


+ 17 - 14
Templates/BaseGame/game/tools/gui/postFxEditor.cs

@@ -3,31 +3,22 @@ function PostFXEditor::onDialogPush( %this )
    //Apply the settings to the controls
    //Apply the settings to the controls
    postVerbose("% - PostFX Editor - Loading GUI.");
    postVerbose("% - PostFX Editor - Loading GUI.");
    
    
-   %this.initialOpen = true;
    %this.refresh();
    %this.refresh();
+   
+   ESettingsWindowList.setSelectedById( 1 );
 }
 }
 
 
 function PostFXEditor::refresh(%this)
 function PostFXEditor::refresh(%this)
 {
 {
-   PostEffectEditorInspector.clearFields();
-   
+   PostEffectEditorList.clear();
+
    %count = PostFXManager.Count();
    %count = PostFXManager.Count();
    for(%i=0; %i < %count; %i++)
    for(%i=0; %i < %count; %i++)
    {
    {
       %postEffect = PostFXManager.getKey(%i);  
       %postEffect = PostFXManager.getKey(%i);  
       
       
-      if(isObject(%postEffect) && %postEffect.isMethod("populatePostFXSettings"))
-      {
-         %postEffect.populatePostFXSettings();
-      }
+      PostEffectEditorList.addRow( %i, %postEffect.getName() );
    }
    }
-   
-   //First time we open it this 'session', we'll go ahead and collapse the groups
-   //so it's not too visually busy
-   if(%this.initialOpen)
-      PostEffectEditorInspector.setGroupsExpanded(false);   
-      
-   %this.initialOpen = false;
 }
 }
 
 
 function PostFXEditor::apply(%this)
 function PostFXEditor::apply(%this)
@@ -47,4 +38,16 @@ function PostFXEditor::apply(%this)
 function PostFXEditor::revert(%this)
 function PostFXEditor::revert(%this)
 {
 {
    PostFXManager::loadPresetHandler($PostFXManager::currentPreset);
    PostFXManager::loadPresetHandler($PostFXManager::currentPreset);
+}
+
+function PostEffectEditorList::onSelect( %this, %id, %text )
+{
+   PostEffectEditorInspector.clearFields();
+   
+   %postEffect = PostFXManager.getKey(%id);  
+      
+   if(isObject(%postEffect) && %postEffect.isMethod("populatePostFXSettings"))
+   {
+      %postEffect.populatePostFXSettings();
+   }
 }
 }

+ 161 - 51
Templates/BaseGame/game/tools/gui/postFxEditor.gui

@@ -14,21 +14,6 @@
    canSave = "1";
    canSave = "1";
    canSaveDynamicFields = "1";
    canSaveDynamicFields = "1";
 
 
-   new DbgFileView() {
-      position = "0 0";
-      extent = "8 2";
-      minExtent = "8 2";
-      horizSizing = "right";
-      vertSizing = "bottom";
-      profile = "GuiDefaultProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-   };
    new GuiWindowCtrl(ppOptionsWindow) {
    new GuiWindowCtrl(ppOptionsWindow) {
       text = "PostFX Editor";
       text = "PostFX Editor";
       resizeWidth = "1";
       resizeWidth = "1";
@@ -46,8 +31,8 @@
       anchorBottom = "0";
       anchorBottom = "0";
       anchorLeft = "1";
       anchorLeft = "1";
       anchorRight = "0";
       anchorRight = "0";
-      position = "306 54";
-      extent = "411 615";
+      position = "197 65";
+      extent = "642 615";
       minExtent = "8 8";
       minExtent = "8 8";
       horizSizing = "center";
       horizSizing = "center";
       vertSizing = "center";
       vertSizing = "center";
@@ -60,27 +45,25 @@
       canSave = "1";
       canSave = "1";
       canSaveDynamicFields = "0";
       canSaveDynamicFields = "0";
 
 
-      new GuiScrollCtrl() {
-         willFirstRespond = "1";
-         hScrollBar = "dynamic";
-         vScrollBar = "dynamic";
-         lockHorizScroll = "0";
-         lockVertScroll = "0";
-         constantThumbHeight = "0";
-         childMargin = "0 0";
-         mouseWheelScrollSpeed = "-1";
+      new GuiSplitContainer() {
+         orientation = "Vertical";
+         splitterSize = "2";
+         splitPoint = "182 100";
+         fixedPanel = "None";
+         fixedSize = "100";
+         docking = "None";
          margin = "0 0 0 0";
          margin = "0 0 0 0";
          padding = "0 0 0 0";
          padding = "0 0 0 0";
          anchorTop = "1";
          anchorTop = "1";
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "3 23";
-         extent = "405 558";
-         minExtent = "8 2";
+         position = "0 24";
+         extent = "642 562";
+         minExtent = "64 64";
          horizSizing = "width";
          horizSizing = "width";
          vertSizing = "height";
          vertSizing = "height";
-         profile = "ToolsGuiScrollProfile";
+         profile = "ToolsGuiSolidDefaultProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
@@ -89,31 +72,158 @@
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
 
 
-         new GuiVariableInspector(PostEffectEditorInspector) {
-            dividerMargin = "5";
-            showCustomFields = "1";
-            stackingType = "Vertical";
-            horizStacking = "Left to Right";
-            vertStacking = "Top to Bottom";
-            padding = "1";
-            dynamicSize = "1";
-            dynamicNonStackExtent = "0";
-            dynamicPos = "0";
-            changeChildSizeToFit = "1";
-            changeChildPosition = "1";
-            position = "1 1";
-            extent = "388 416";
+         new GuiPanel() {
+            docking = "Client";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "0 0";
+            extent = "180 562";
             minExtent = "16 16";
             minExtent = "16 16";
-            horizSizing = "width";
-            vertSizing = "height";
-            profile = "GuiDefaultProfile";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "ToolsGuiSolidDefaultProfile";
             visible = "1";
             visible = "1";
             active = "1";
             active = "1";
             tooltipProfile = "GuiToolTipProfile";
             tooltipProfile = "GuiToolTipProfile";
             hovertime = "1000";
             hovertime = "1000";
             isContainer = "1";
             isContainer = "1";
+            internalName = "Panel1";
             canSave = "1";
             canSave = "1";
             canSaveDynamicFields = "0";
             canSaveDynamicFields = "0";
+
+            new GuiScrollCtrl() {
+               willFirstRespond = "1";
+               hScrollBar = "alwaysOff";
+               vScrollBar = "dynamic";
+               lockHorizScroll = "0";
+               lockVertScroll = "0";
+               constantThumbHeight = "0";
+               childMargin = "0 0";
+               mouseWheelScrollSpeed = "-1";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "3 3";
+               extent = "177 643";
+               minExtent = "100 50";
+               horizSizing = "width";
+               vertSizing = "height";
+               profile = "ToolsGuiScrollProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+
+               new GuiTextListCtrl(PostEffectEditorList) {
+                  columns = "0";
+                  fitParentWidth = "0";
+                  clipColumnText = "0";
+                  rowHeightPadding = "2";
+                  position = "1 1";
+                  extent = "9 2";
+                  minExtent = "8 2";
+                  horizSizing = "width";
+                  vertSizing = "height";
+                  profile = "ToolsGuiListBoxProfile";
+                  visible = "1";
+                  active = "1";
+                  tooltipProfile = "ToolsGuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "0";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+            };
+         };
+         new GuiPanel() {
+            docking = "Client";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "184 0";
+            extent = "458 562";
+            minExtent = "16 16";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "ToolsGuiSolidDefaultProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            internalName = "panel2";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+
+            new GuiScrollCtrl() {
+               willFirstRespond = "1";
+               hScrollBar = "dynamic";
+               vScrollBar = "dynamic";
+               lockHorizScroll = "0";
+               lockVertScroll = "0";
+               constantThumbHeight = "0";
+               childMargin = "0 0";
+               mouseWheelScrollSpeed = "-1";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "0 0";
+               extent = "458 562";
+               minExtent = "8 2";
+               horizSizing = "width";
+               vertSizing = "height";
+               profile = "ToolsGuiScrollProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "GuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+
+               new GuiVariableInspector(PostEffectEditorInspector) {
+                  dividerMargin = "5";
+                  showCustomFields = "1";
+                  stackingType = "Vertical";
+                  horizStacking = "Left to Right";
+                  vertStacking = "Top to Bottom";
+                  padding = "1";
+                  dynamicSize = "1";
+                  dynamicNonStackExtent = "0";
+                  dynamicPos = "0";
+                  changeChildSizeToFit = "1";
+                  changeChildPosition = "1";
+                  position = "1 1";
+                  extent = "441 615";
+                  minExtent = "16 16";
+                  horizSizing = "width";
+                  vertSizing = "height";
+                  profile = "GuiDefaultProfile";
+                  visible = "1";
+                  active = "1";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "1";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+            };
          };
          };
       };
       };
       new GuiButtonCtrl(ppOptionsApply) {
       new GuiButtonCtrl(ppOptionsApply) {
@@ -121,7 +231,7 @@
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
-         position = "309 587";
+         position = "547 588";
          extent = "93 23";
          extent = "93 23";
          minExtent = "8 8";
          minExtent = "8 8";
          horizSizing = "right";
          horizSizing = "right";
@@ -142,7 +252,7 @@
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
-         position = "111 587";
+         position = "349 588";
          extent = "93 23";
          extent = "93 23";
          minExtent = "8 8";
          minExtent = "8 8";
          horizSizing = "right";
          horizSizing = "right";
@@ -163,7 +273,7 @@
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
-         position = "12 587";
+         position = "250 588";
          extent = "93 23";
          extent = "93 23";
          minExtent = "8 8";
          minExtent = "8 8";
          horizSizing = "right";
          horizSizing = "right";
@@ -184,7 +294,7 @@
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
-         position = "210 587";
+         position = "448 588";
          extent = "93 23";
          extent = "93 23";
          minExtent = "8 8";
          minExtent = "8 8";
          horizSizing = "right";
          horizSizing = "right";

+ 1 - 1
Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs

@@ -350,7 +350,7 @@ function TerrainMaterialDlg::newMat( %this )
    %module = AssetBrowser.getModuleFromAddress(%path);
    %module = AssetBrowser.getModuleFromAddress(%path);
    AssetBrowser.selectedModule = %module.moduleID;
    AssetBrowser.selectedModule = %module.moduleID;
    
    
-   AssetBrowser.currentAddress = "data/" @ %module.moduleID;
+   AssetBrowser.dirHandler.currentAddress = "data/" @ %module.moduleID;
    
    
    AssetBrowser.setupCreateNewAsset("TerrainMaterialAsset", AssetBrowser.selectedModule);
    AssetBrowser.setupCreateNewAsset("TerrainMaterialAsset", AssetBrowser.selectedModule);
 }
 }