From b1e3706dd6d135134a6e60fb3c6fbc3c3af1e2aa Mon Sep 17 00:00:00 2001 From: Areloch Date: Tue, 3 Dec 2019 00:09:18 -0600 Subject: [PATCH] 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 --- Engine/source/T3D/assets/ComponentAsset.cpp | 4 - Engine/source/T3D/assets/CppAsset.cpp | 4 - Engine/source/T3D/assets/CubemapAsset.cpp | 4 - Engine/source/T3D/assets/ExampleAsset.cpp | 6 +- Engine/source/T3D/assets/GUIAsset.cpp | 4 - Engine/source/T3D/assets/GameObjectAsset.cpp | 4 - Engine/source/T3D/assets/LevelAsset.cpp | 4 - Engine/source/T3D/assets/ParticleAsset.cpp | 6 +- Engine/source/T3D/assets/PostEffectAsset.cpp | 4 - Engine/source/T3D/assets/ScriptAsset.cpp | 4 - Engine/source/T3D/assets/SoundAsset.cpp | 4 - .../source/T3D/assets/stateMachineAsset.cpp | 6 +- Engine/source/gui/editor/popupMenu.cpp | 7 +- Engine/source/ts/tsShapeConstruct.cpp | 6 - .../BaseGame/game/core/gui/scripts/canvas.cs | 4 +- .../core/postFX/scripts/FXAAPostFX.asset.taml | 6 + .../postFX/scripts/{fxaa.cs => FXAAPostFX.cs} | 2 +- .../core/postFX/scripts/GlowPostFX.asset.taml | 6 + .../postFX/scripts/{glow.cs => GlowPostFX.cs} | 2 +- .../core/postFX/scripts/HDRPostFX.asset.taml | 6 + .../postFX/scripts/{hdr.cs => HDRPostFX.cs} | 0 .../core/postFX/scripts/SSAOPostFx.asset.taml | 6 + .../postFX/scripts/{ssao.cs => SSAOPostFx.cs} | 0 .../scripts/TurbulencePostFX.asset.taml | 6 + .../{turbulence.cs => TurbulencePostFX.cs} | 2 +- .../core/postFX/scripts/fogPostFX.asset.taml | 6 + .../game/core/postFX/scripts/fogPostFX.cs | 67 ++ .../core/postFX/scripts/lightRays.asset.taml | 8 + .../scripts/{lightRay.cs => lightRays.cs} | 0 .../reflectionProbeArrayPostFX.asset.taml | 6 + .../{pbr.cs => reflectionProbeArrayPostFX.cs} | 0 .../scripts/underWaterFogPostFX.asset.taml | 6 + .../{fog.cs => underWaterFogPostFX.cs} | 57 +- .../game/core/postFX/scripts/vignette.cs | 46 +- .../postFX/scripts/vignettePostFX.asset.taml | 6 + .../tools/assetBrowser/art/folderIcon.png | Bin 12378 -> 10669 bytes .../tools/assetBrowser/assetImportConfigs.xml | 159 ++- .../guis/AssetImportConfigEditor.gui | 429 ++++++++ .../tools/assetBrowser/guis/assetBrowser.gui | 6 - .../tools/assetBrowser/guis/assetImport.gui | 943 +++++++++--------- .../tools/assetBrowser/guis/newFolder.gui | 118 +++ .../tools/assetBrowser/guis/selectPath.gui | 257 +++++ .../BaseGame/game/tools/assetBrowser/main.cs | 20 + .../assetBrowser/scripts/assetBrowser.cs | 574 ++--------- .../tools/assetBrowser/scripts/assetImport.cs | 397 ++++---- .../scripts/assetImportConfigEditor.cs | 203 ++++ .../assetBrowser/scripts/assetTypes/cpp.cs | 12 +- .../assetBrowser/scripts/assetTypes/folder.cs | 46 +- .../assetBrowser/scripts/assetTypes/gui.cs | 2 +- .../assetBrowser/scripts/assetTypes/image.cs | 4 +- .../assetBrowser/scripts/assetTypes/level.cs | 2 +- .../scripts/assetTypes/material.cs | 8 +- .../assetBrowser/scripts/assetTypes/script.cs | 9 +- .../assetBrowser/scripts/assetTypes/shape.cs | 33 +- .../scripts/assetTypes/terrain.cs | 2 +- .../scripts/assetTypes/terrainMaterial.cs | 2 +- .../assetBrowser/scripts/directoryHandling.cs | 207 ++++ .../tools/assetBrowser/scripts/editAsset.cs | 32 +- .../tools/assetBrowser/scripts/newAsset.cs | 7 +- .../tools/assetBrowser/scripts/popupMenus.cs | 13 + .../tools/assetBrowser/scripts/selectPath.cs | 47 + .../game/tools/classIcons/material.png | Bin 0 -> 759 bytes .../game/tools/gui/editorSettingsWindow.ed.cs | 2 + .../game/tools/gui/fieldTypes/buttonField.cs | 46 + .../BaseGame/game/tools/gui/guiDialogs.ed.cs | 1 + .../BaseGame/game/tools/gui/images/window.png | Bin 5308 -> 6786 bytes .../BaseGame/game/tools/gui/postFxEditor.cs | 31 +- .../BaseGame/game/tools/gui/postFxEditor.gui | 212 +++- .../interfaces/terrainMaterialDlg.ed.cs | 2 +- 69 files changed, 2692 insertions(+), 1443 deletions(-) create mode 100644 Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.asset.taml rename Templates/BaseGame/game/core/postFX/scripts/{fxaa.cs => FXAAPostFX.cs} (98%) create mode 100644 Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.asset.taml rename Templates/BaseGame/game/core/postFX/scripts/{glow.cs => GlowPostFX.cs} (99%) create mode 100644 Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.asset.taml rename Templates/BaseGame/game/core/postFX/scripts/{hdr.cs => HDRPostFX.cs} (100%) create mode 100644 Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.asset.taml rename Templates/BaseGame/game/core/postFX/scripts/{ssao.cs => SSAOPostFx.cs} (100%) create mode 100644 Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.asset.taml rename Templates/BaseGame/game/core/postFX/scripts/{turbulence.cs => TurbulencePostFX.cs} (98%) create mode 100644 Templates/BaseGame/game/core/postFX/scripts/fogPostFX.asset.taml create mode 100644 Templates/BaseGame/game/core/postFX/scripts/fogPostFX.cs create mode 100644 Templates/BaseGame/game/core/postFX/scripts/lightRays.asset.taml rename Templates/BaseGame/game/core/postFX/scripts/{lightRay.cs => lightRays.cs} (100%) create mode 100644 Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.asset.taml rename Templates/BaseGame/game/core/postFX/scripts/{pbr.cs => reflectionProbeArrayPostFX.cs} (100%) create mode 100644 Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.asset.taml rename Templates/BaseGame/game/core/postFX/scripts/{fog.cs => underWaterFogPostFX.cs} (66%) create mode 100644 Templates/BaseGame/game/core/postFX/scripts/vignettePostFX.asset.taml create mode 100644 Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui create mode 100644 Templates/BaseGame/game/tools/assetBrowser/guis/newFolder.gui create mode 100644 Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui create mode 100644 Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.cs create mode 100644 Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.cs create mode 100644 Templates/BaseGame/game/tools/assetBrowser/scripts/selectPath.cs create mode 100644 Templates/BaseGame/game/tools/classIcons/material.png create mode 100644 Templates/BaseGame/game/tools/gui/fieldTypes/buttonField.cs diff --git a/Engine/source/T3D/assets/ComponentAsset.cpp b/Engine/source/T3D/assets/ComponentAsset.cpp index 324ec495f..d0464490c 100644 --- a/Engine/source/T3D/assets/ComponentAsset.cpp +++ b/Engine/source/T3D/assets/ComponentAsset.cpp @@ -105,10 +105,6 @@ 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; } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/assets/CppAsset.cpp b/Engine/source/T3D/assets/CppAsset.cpp index 91ab0a8ae..ce2ff3bb3 100644 --- a/Engine/source/T3D/assets/CppAsset.cpp +++ b/Engine/source/T3D/assets/CppAsset.cpp @@ -99,10 +99,6 @@ CppAsset::CppAsset() : AssetBase() CppAsset::~CppAsset() { - // If the asset manager does not own the asset then we own the - // asset definition so delete it. - if (!getOwned()) - delete mpAssetDefinition; } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/assets/CubemapAsset.cpp b/Engine/source/T3D/assets/CubemapAsset.cpp index 32d5dce3a..b68fea184 100644 --- a/Engine/source/T3D/assets/CubemapAsset.cpp +++ b/Engine/source/T3D/assets/CubemapAsset.cpp @@ -105,10 +105,6 @@ 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; } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/assets/ExampleAsset.cpp b/Engine/source/T3D/assets/ExampleAsset.cpp index b8c43ac07..8953880e5 100644 --- a/Engine/source/T3D/assets/ExampleAsset.cpp +++ b/Engine/source/T3D/assets/ExampleAsset.cpp @@ -98,10 +98,6 @@ 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. Parent::copyTo(object); -} \ No newline at end of file +} diff --git a/Engine/source/T3D/assets/GUIAsset.cpp b/Engine/source/T3D/assets/GUIAsset.cpp index ec06156a2..6089ea230 100644 --- a/Engine/source/T3D/assets/GUIAsset.cpp +++ b/Engine/source/T3D/assets/GUIAsset.cpp @@ -92,10 +92,6 @@ 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; } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/assets/GameObjectAsset.cpp b/Engine/source/T3D/assets/GameObjectAsset.cpp index 4058d5ee1..514d6da20 100644 --- a/Engine/source/T3D/assets/GameObjectAsset.cpp +++ b/Engine/source/T3D/assets/GameObjectAsset.cpp @@ -103,10 +103,6 @@ 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; } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/assets/LevelAsset.cpp b/Engine/source/T3D/assets/LevelAsset.cpp index 6fd73db92..4036b1666 100644 --- a/Engine/source/T3D/assets/LevelAsset.cpp +++ b/Engine/source/T3D/assets/LevelAsset.cpp @@ -103,10 +103,6 @@ LevelAsset::LevelAsset() : AssetBase(), mIsSubLevel(false) LevelAsset::~LevelAsset() { - // If the asset manager does not own the asset then we own the - // asset definition so delete it. - if (!getOwned()) - delete mpAssetDefinition; } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/assets/ParticleAsset.cpp b/Engine/source/T3D/assets/ParticleAsset.cpp index bcefd2dfa..30cf327ab 100644 --- a/Engine/source/T3D/assets/ParticleAsset.cpp +++ b/Engine/source/T3D/assets/ParticleAsset.cpp @@ -100,10 +100,6 @@ 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; -} \ No newline at end of file +} diff --git a/Engine/source/T3D/assets/PostEffectAsset.cpp b/Engine/source/T3D/assets/PostEffectAsset.cpp index 745e6fe24..5c68f5429 100644 --- a/Engine/source/T3D/assets/PostEffectAsset.cpp +++ b/Engine/source/T3D/assets/PostEffectAsset.cpp @@ -99,10 +99,6 @@ 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; } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/assets/ScriptAsset.cpp b/Engine/source/T3D/assets/ScriptAsset.cpp index 25ded7f9e..f99bb1b6d 100644 --- a/Engine/source/T3D/assets/ScriptAsset.cpp +++ b/Engine/source/T3D/assets/ScriptAsset.cpp @@ -98,10 +98,6 @@ ScriptAsset::ScriptAsset() : AssetBase(), mIsServerSide(true) ScriptAsset::~ScriptAsset() { - // If the asset manager does not own the asset then we own the - // asset definition so delete it. - if (!getOwned()) - delete mpAssetDefinition; } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/assets/SoundAsset.cpp b/Engine/source/T3D/assets/SoundAsset.cpp index 9563f5d8a..052bf4d63 100644 --- a/Engine/source/T3D/assets/SoundAsset.cpp +++ b/Engine/source/T3D/assets/SoundAsset.cpp @@ -104,10 +104,6 @@ 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; } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/assets/stateMachineAsset.cpp b/Engine/source/T3D/assets/stateMachineAsset.cpp index 44ca7f40d..3e2d4f1a5 100644 --- a/Engine/source/T3D/assets/stateMachineAsset.cpp +++ b/Engine/source/T3D/assets/stateMachineAsset.cpp @@ -99,10 +99,6 @@ 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; -} \ No newline at end of file +} diff --git a/Engine/source/gui/editor/popupMenu.cpp b/Engine/source/gui/editor/popupMenu.cpp index 1c1f44ae4..b2ba122a7 100644 --- a/Engine/source/gui/editor/popupMenu.cpp +++ b/Engine/source/gui/editor/popupMenu.cpp @@ -51,7 +51,7 @@ PopupMenu::PopupMenu() mBarTitle = StringTable->EmptyString(); mBounds = RectI(0, 0, 64, 64); - mVisible = true; + mVisible = false; mBitmapIndex = -1; mDrawBitmapOnly = false; @@ -86,6 +86,7 @@ void PopupMenu::initPersistFields() addField("barTitle", TypeCaseString, Offset(mBarTitle, 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); + + mVisible = true; } void PopupMenu::hidePopup() @@ -449,6 +452,8 @@ void PopupMenu::hidePopup() } hidePopupSubmenus(); + + mVisible = false; } void PopupMenu::hidePopupSubmenus() diff --git a/Engine/source/ts/tsShapeConstruct.cpp b/Engine/source/ts/tsShapeConstruct.cpp index 03a2d3757..ca40b142d 100644 --- a/Engine/source/ts/tsShapeConstruct.cpp +++ b/Engine/source/ts/tsShapeConstruct.cpp @@ -402,12 +402,6 @@ bool TSShapeConstructor::onAdd() if ( !Parent::onAdd() ) 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 TSShapeConstructor* tss = findShapeConstructor( mShapePath ); if ( tss ) diff --git a/Templates/BaseGame/game/core/gui/scripts/canvas.cs b/Templates/BaseGame/game/core/gui/scripts/canvas.cs index 50263f53d..ee0be71a7 100644 --- a/Templates/BaseGame/game/core/gui/scripts/canvas.cs +++ b/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 // It's formatted as AATypexAALevel // So, FXAAx4 or MLAAx2 - if ( isObject( FXAA_PostEffect ) ) - FXAA_PostEffect.isEnabled = ( %aa > 0 ) ? true : false; + if ( isObject( FXAAPostFX ) ) + FXAAPostFX.isEnabled = ( %aa > 0 ) ? true : false; } diff --git a/Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.asset.taml new file mode 100644 index 000000000..ddaefea3c --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/fxaa.cs b/Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.cs similarity index 98% rename from Templates/BaseGame/game/core/postFX/scripts/fxaa.cs rename to Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.cs index 4b81c6e19..b24aef85f 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/fxaa.cs +++ b/Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.cs @@ -47,7 +47,7 @@ singleton ShaderData( FXAA_ShaderData ) pixVersion = 3.0; }; -singleton PostEffect( FXAA_PostEffect ) +singleton PostEffect( FXAAPostFX ) { isEnabled = false; diff --git a/Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.asset.taml new file mode 100644 index 000000000..2a3a724e0 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/glow.cs b/Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.cs similarity index 99% rename from Templates/BaseGame/game/core/postFX/scripts/glow.cs rename to Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.cs index c4e7a9595..41a23db82 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/glow.cs +++ b/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 // passes by default so we don't do the extra drawing. diff --git a/Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.asset.taml new file mode 100644 index 000000000..a0bb8dca9 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/hdr.cs b/Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.cs similarity index 100% rename from Templates/BaseGame/game/core/postFX/scripts/hdr.cs rename to Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.cs diff --git a/Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.asset.taml new file mode 100644 index 000000000..b506c5b97 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/ssao.cs b/Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.cs similarity index 100% rename from Templates/BaseGame/game/core/postFX/scripts/ssao.cs rename to Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.cs diff --git a/Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.asset.taml new file mode 100644 index 000000000..b022f0a3f --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/turbulence.cs b/Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.cs similarity index 98% rename from Templates/BaseGame/game/core/postFX/scripts/turbulence.cs rename to Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.cs index 967c3b2bf..f9b0f0730 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/turbulence.cs +++ b/Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.cs @@ -42,7 +42,7 @@ singleton ShaderData( PFX_TurbulenceShader ) pixVersion = 3.0; }; -singleton PostEffect( TurbulenceFx ) +singleton PostEffect( TurbulencePostFX ) { isEnabled = false; allowReflectPass = true; diff --git a/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.asset.taml new file mode 100644 index 000000000..4745a0050 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.cs b/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.cs new file mode 100644 index 000000000..ed9dd9ce7 --- /dev/null +++ b/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; +}; \ No newline at end of file diff --git a/Templates/BaseGame/game/core/postFX/scripts/lightRays.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/lightRays.asset.taml new file mode 100644 index 000000000..cd2d63b51 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/lightRays.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/lightRay.cs b/Templates/BaseGame/game/core/postFX/scripts/lightRays.cs similarity index 100% rename from Templates/BaseGame/game/core/postFX/scripts/lightRay.cs rename to Templates/BaseGame/game/core/postFX/scripts/lightRays.cs diff --git a/Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.asset.taml new file mode 100644 index 000000000..ecaf521d5 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/pbr.cs b/Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.cs similarity index 100% rename from Templates/BaseGame/game/core/postFX/scripts/pbr.cs rename to Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.cs diff --git a/Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.asset.taml new file mode 100644 index 000000000..1dc8dd11b --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/fog.cs b/Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.cs similarity index 66% rename from Templates/BaseGame/game/core/postFX/scripts/fog.cs rename to Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.cs index 4b9bfc663..739224a0b 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/fog.cs +++ b/Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.cs @@ -20,53 +20,6 @@ // 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 //------------------------------------------------------------------------------ @@ -96,7 +49,7 @@ singleton GFXStateBlockData( UnderwaterFogPassStateBlock : PFX_DefaultStateBlock }; -singleton PostEffect( UnderwaterFogPostFx ) +singleton PostEffect( underWaterFogPostFX ) { oneFrameOnly = true; onThisFrame = false; @@ -120,16 +73,16 @@ singleton PostEffect( UnderwaterFogPostFx ) isEnabled = true; }; -function UnderwaterFogPostFx::onEnabled( %this ) +function underWaterFogPostFX::onEnabled( %this ) { - TurbulenceFx.enable(); + TurbulencePostFX.enable(); CausticsPFX.enable(); return true; } -function UnderwaterFogPostFx::onDisabled( %this ) +function underWaterFogPostFX::onDisabled( %this ) { - TurbulenceFx.disable(); + TurbulencePostFX.disable(); CausticsPFX.disable(); return false; } diff --git a/Templates/BaseGame/game/core/postFX/scripts/vignette.cs b/Templates/BaseGame/game/core/postFX/scripts/vignette.cs index d22f7d14a..6c7f294c0 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/vignette.cs +++ b/Templates/BaseGame/game/core/postFX/scripts/vignette.cs @@ -36,7 +36,12 @@ singleton ShaderData( VignetteShader ) pixVersion = 2.0; }; -singleton PostEffect( VignettePostEffect ) +function vignettePostFX::onAdd( %this ) +{ + PostFXManager.registerPostEffect(%this); +} + +singleton PostEffect( vignettePostFX ) { isEnabled = false; allowReflectPass = false; @@ -48,8 +53,45 @@ singleton PostEffect( VignettePostEffect ) renderPriority = 10; }; -function VignettePostEffect::setShaderConsts(%this) +function vignettePostFX::setShaderConsts(%this) { %this.setShaderConst("$Vmax", $VignettePostEffect::VMax); %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; } \ No newline at end of file diff --git a/Templates/BaseGame/game/core/postFX/scripts/vignettePostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/vignettePostFX.asset.taml new file mode 100644 index 000000000..c2bd1c15e --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/vignettePostFX.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/folderIcon.png b/Templates/BaseGame/game/tools/assetBrowser/art/folder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rC2ti5?5X>En zf>rRZx4@dl&d!1$?mgHr?C@lBE(swN z!bfm*pQx#%0)CD872+Xl7^i&q*2b+tD73ZiE)Pk}K&*bQ6Yi~`?{_#{X`5id*fvqS z-mtuqQpbz;tMpl*1!HceE=t=9`^IPPuyzv5d%P9fSdlh+0W$DhMT53!Pf@~jVAN!g zPj2hafA=vXc0YP}c-%v2lkR$8*HS=_j1zMLH-B1pGXJaN?P>lf#I(6Y#TKlfycQmxgEAfY6)dmrtUsBCD1iW>v_)ZDO?B2Mb>_V~G#32(N*8 zpvedtlmF4 - - - 0 - Z_AXIS - TrailingNumber - 0.01 - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - - - Col - CollisionMesh - 1 - LOS - CollisionMesh - 1 - - - _AO,_AMBIENT,_AMBIENTOCCLUSION - _ROUGH,_ROUGHNESS - 1 - _COMP,_COMPOSITE - _SMOOTH,_SMOOTHNESS - 1 - _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a, - 0 - 1 - N/A - 1 - _NORMAL,_NORM - 1.0 - _METAL,_MET,_METALNESS,_METALLIC - Bilinear - + - ColorEffect*, + 1 1 1 1 - 0 - 1 + + + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + TrailingNumber + 0 + 0 + 0 + Z_AXIS + 0 + + + _NORMAL,_NORM + _AO,_AMBIENT,_AMBIENTOCCLUSION + _METAL,_MET,_METALNESS,_METALLIC + 1 + _COMP,_COMPOSITE + _ROUGH,_ROUGHNESS + N/A + 1 + 1.0 + Bilinear + 0 + _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL + 1 + _SMOOTH,_SMOOTHNESS + 1 + + + AutoPrune + 0 + 0 + 1 + + + Col + LOS + 1 + 1 + CollisionMesh + CollisionMesh 1 + Seconds + 2 1 1.0 + 1.0 + 0 + + + + + _METAL,_MET,_METALNESS,_METALLIC + 0 + Bilinear + _SMOOTH,_SMOOTHNESS + 1 + _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a, + _AO,_AMBIENT,_AMBIENTOCCLUSION + _COMP,_COMPOSITE + 1.0 + 1 + _NORMAL,_NORM + _ROUGH,_ROUGHNESS + 1 + N/A + 1 + + + CollisionMesh + LOS + Col + CollisionMesh + 1 + 1 + + 0 1.0 + 1.0 AutoPrune + + 1 + 0 + 0 + 0 + 0 + 1 + TrailingNumber + 0 + Z_AXIS + 0 + 0.01 + 0 + + + ColorEffect*, + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui new file mode 100644 index 000000000..89ad5aef3 --- /dev/null +++ b/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 --- diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui index 299007868..05b81844a 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui @@ -20,18 +20,12 @@ coreModulesFilter = "0"; currentPreviewPage = "0"; Enabled = "1"; - importAssetFinalListArray = "20689"; - ImportAssetResolutionsPopup = "18119"; - importAssetUnprocessedListArray = "20688"; - importingFilesArray = "20687"; - isReImportingAsset = "0"; navigationHistoryIdx = "0"; onlyShowModulesWithAssets = "0"; previewData = "19953"; previewSize = "80"; templateFilesPath = "tools/assetBrowser/scripts/templateFiles/"; totalPages = "1"; - treeFilterMode = "list"; new GuiWindowCtrl(AssetBrowser_addFilterWindow) { text = "Create New Tag"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui index a89b344c5..6fdfd88c2 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui @@ -14,8 +14,8 @@ canSave = "1"; canSaveDynamicFields = "1"; - new GuiWindowCtrl(ImportAssetOptionsWindow) { - text = "Import Options"; + new GuiWindowCtrl(ImportAssetWindow) { + text = "Import Assets"; resizeWidth = "1"; resizeHeight = "1"; canMove = "1"; @@ -30,62 +30,241 @@ anchorBottom = "0"; anchorLeft = "1"; anchorRight = "0"; - position = "339 179"; - extent = "346 409"; + position = "132 80"; + extent = "733 582"; minExtent = "48 92"; horizSizing = "center"; vertSizing = "center"; profile = "ToolsGuiWindowProfile"; - visible = "0"; + visible = "1"; 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"; + new GuiTextCtrl() { + text = "Target Path:"; + maxLength = "1024"; margin = "0 0 0 0"; padding = "0 0 0 0"; anchorTop = "1"; anchorBottom = "0"; anchorLeft = "1"; anchorRight = "0"; - position = "9 26"; - extent = "326 344"; + position = "12 30"; + extent = "116 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(AssetImportTargetAddress) { + 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 = "135 30"; + extent = "569 18"; minExtent = "8 2"; horizSizing = "width"; + vertSizing = "bottom"; + profile = "ToolsGuiTextEditProfile"; + visible = "1"; + active = "0"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapButtonCtrl() { + bitmap = "tools/gui/images/iconOpen.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 = "SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, \"assetImportUpdatePath\");\nSelectAssetPath.selectWindow();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "New Module"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Target Module:"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "12 54"; + extent = "116 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(AssetImportTargetModule) { + 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 = "135 53"; + extent = "569 18"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "bottom"; + profile = "ToolsGuiTextEditProfile"; + visible = "1"; + active = "0"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Import Options Config:"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "12 79"; + extent = "116 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 GuiPopUpMenuCtrlEx(ImportAssetConfigList) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + hotTrackCallback = "0"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "135 78"; + extent = "569 22"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "bottom"; + profile = "ToolsGuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapButtonCtrl() { + bitmap = "tools/gui/images/save-as"; + bitmapMode = "Centered"; + autoFitExtents = "0"; + useModifiers = "0"; + useStates = "1"; + masked = "0"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "711 77"; + extent = "15 22"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "Canvas.pushDialog(AssetImportConfigEditor);"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Edit Config"; + hovertime = "1000"; + isContainer = "0"; + 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 = "5 102"; + extent = "723 447"; + minExtent = "64 64"; + horizSizing = "width"; vertSizing = "height"; - profile = "ToolsGuiScrollProfile"; + profile = "ToolsGuiSolidDefaultProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -94,32 +273,257 @@ 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"; + 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 = "GuiDefaultProfile"; + 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"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "589 553"; + 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 553"; + extent = "64 22"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "ImportAssetWindow.close();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(AssetImportSummarization) { + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "4 554"; + extent = "574 23"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "top"; + profile = "ToolsGuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; }; }; new GuiWindowCtrl(ImportAssetConfigEditorWindow) { @@ -131,6 +535,7 @@ canMinimize = "0"; canMaximize = "0"; canCollapse = "0"; + closeCommand = "ImportAssetConfigEditorWindow.close();"; edgeSnap = "1"; margin = "0 0 0 0"; padding = "0 0 0 0"; @@ -152,7 +557,6 @@ hidden = "1"; canSave = "1"; canSaveDynamicFields = "0"; - closeCommand = "ImportAssetConfigEditorWindow.close();"; new GuiTextCtrl() { text = "Configuration Name:"; @@ -281,436 +685,5 @@ }; }; }; - 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"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "Target Module:"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "12 30"; - extent = "116 17"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiPopUpMenuCtrlEx(ImportAssetModuleList) { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - hotTrackCallback = "0"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "134 27"; - extent = "569 22"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiPopupMenuProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - 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 = "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() { - text = "Import Options Config:"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "12 56"; - extent = "116 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 GuiPopUpMenuCtrlEx(ImportAssetConfigList) { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - hotTrackCallback = "0"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "126 53"; - extent = "540 22"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiPopupMenuProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - 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 = "670 53"; - extent = "15 22"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - command = "ImportAssetConfigEditorWindow.addNewConfig();"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "New Config"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/iconInformation.png"; - bitmapMode = "Centered"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "690 53"; - extent = "15 22"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - command = "ImportAssetConfigEditorWindow.editConfig();"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Edit Config"; - hovertime = "1000"; - isContainer = "0"; - 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 = "711 53"; - extent = "15 22"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - command = "ImportAssetConfigEditorWindow.deleteConfig();"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Delete Config"; - 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 82"; - extent = "713 381"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "height"; - profile = "ToolsGuiScrollProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - 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) { - 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 = "348 332"; - 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 = "ImportAssetConfigEditorWindow.createNewImportConfig();"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; }; //--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/newFolder.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/newFolder.gui new file mode 100644 index 000000000..ff1509cb4 --- /dev/null +++ b/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 --- diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui new file mode 100644 index 000000000..bbc4a6b0b --- /dev/null +++ b/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 --- diff --git a/Templates/BaseGame/game/tools/assetBrowser/main.cs b/Templates/BaseGame/game/tools/assetBrowser/main.cs index abc61f2e3..6cf88284a 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/main.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/main.cs @@ -64,10 +64,13 @@ function initializeAssetBrowser() exec("./guis/newComponentAsset.gui"); exec("./guis/editAsset.gui"); exec("./guis/assetImport.gui"); + exec("./guis/assetImportConfigEditor.gui"); exec("./guis/selectModule.gui"); + exec("./guis/selectPath.gui"); exec("./guis/editModule.gui"); exec("./guis/importTemplateModules.gui"); exec("./guis/assetPreviewButtonsTemplate.gui"); + exec("./guis/newFolder.gui"); exec("./scripts/assetBrowser.cs"); exec("./scripts/popupMenus.cs"); @@ -79,6 +82,9 @@ function initializeAssetBrowser() exec("./scripts/editAsset.cs"); exec("./scripts/editModule.cs"); exec("./scripts/selectModule.cs"); + exec("./scripts/assetImportConfigEditor.cs"); + exec("./scripts/directoryHandling.cs"); + exec("./scripts/selectPath.cs"); //Processing for the different asset types exec("./scripts/assetTypes/component.cs"); @@ -108,6 +114,20 @@ function initializeAssetBrowser() Input::GetEventManager().subscribe( AssetBrowser, "DropFile" ); 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(); } diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs index c890a6ce7..8459d809f 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs @@ -41,27 +41,20 @@ function AssetBrowser::onWake(%this) if(!isObject(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.importAssetUnprocessedListArray = new ArrayObject(); %this.importAssetFinalListArray = new ArrayObject(); - %this.isReImportingAsset = false; + %this.coreModulesFilter = false; %this.toolsModulesFilter = false; %this.onlyShowModulesWithAssets = false; - %this.treeFilterMode = "list"; %this.folderPanelState = true; %this.folderPanelSplit = 0; @@ -109,7 +102,7 @@ function AssetBrowser::viewCoreModulesFilter(%this) EditorSettings.setValue("Assets/Browser/showCoreModule", %newVal); - AssetBrowser.loadFilters(); + AssetBrowser.refresh(); } function AssetBrowser::viewToolsModulesFilter(%this) @@ -121,7 +114,7 @@ function AssetBrowser::viewToolsModulesFilter(%this) EditorSettings.setValue("Assets/Browser/showToolsModule", %newVal); - AssetBrowser.loadFilters(); + AssetBrowser.refresh(); } function AssetBrowser::viewPopulatedModulesFilter(%this) @@ -133,7 +126,7 @@ function AssetBrowser::viewPopulatedModulesFilter(%this) EditorSettings.setValue("Assets/Browser/showOnlyPopulatedModule", %newVal); - AssetBrowser.loadFilters(); + AssetBrowser.refresh(); } function AssetBrowser::toggleShowingFolders(%this) @@ -145,7 +138,7 @@ function AssetBrowser::toggleShowingFolders(%this) EditorSettings.setValue("Assets/Browser/showFolders", %newVal); - AssetBrowser.loadFilters(); + AssetBrowser.refresh(); } function AssetBrowser::toggleShowingEmptyFolders(%this) @@ -157,19 +150,7 @@ function AssetBrowser::toggleShowingEmptyFolders(%this) 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) @@ -223,6 +204,7 @@ function AssetBrowser::toggleAssetTypeFilter(%this, %assetTypeIdx) %this.rebuildAssetArray(); } +// function AssetBrowser::selectAsset( %this, %asset ) { if(AssetBrowser.selectCallback !$= "") @@ -280,10 +262,8 @@ function AssetBrowser::showDialog( %this, %AssetTypeFilter, %selectCallback, %ta { %this-->SelectButton.setHidden(false); } - - //AssetBrowser_importAssetWindow.setVisible(0); - //AssetBrowser_importAssetConfigWindow.setVisible(0); - AssetBrowser.loadFilters(); + + AssetBrowser.loadDirectories(); } function AssetBrowser::hideDialog( %this ) @@ -397,6 +377,10 @@ function AssetBrowser::buildPreviewArray( %this, %asset, %moduleName ) AssetPreviewArray.add( %previewButton, %this.previewData.previewImage ); } +function AssetBrowser::refresh(%this) +{ + %this.navigateTo(%this.dirHandler.currentAddress); +} // // 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.buildIconTable( "tools/classIcons/Prefab" @ - ":tools/classIcons/SimSet"); %dataItem = AssetBrowser-->filterTree.insertItem(0, "Data"); - %this.loadFolders("Data", %dataItem); + %this.dirHandler.loadFolders("Data", %dataItem); //If set to, show core if(%this.coreModulesFilter) { %coreItem = AssetBrowser-->filterTree.insertItem(0, "Core"); - %this.loadFolders("Core", %coreItem); + %this.dirHandler.loadFolders("Core", %coreItem); } //If set to, show tools if(%this.toolsModulesFilter) { %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(); - /*%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); - /*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 if(%this.onlyShowModulesWithAssets) { @@ -677,61 +446,14 @@ function AssetBrowser::loadFilters( %this ) %dataItem = AssetBrowser-->filterTree.findItemByName("Data"); 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.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 ) @@ -765,26 +487,6 @@ function AssetBrowser::updateSelection( %this, %asset, %moduleName ) %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 //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); 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 %assetType = AssetDatabase.getAssetCategory(%assetId); @@ -1015,7 +717,10 @@ function AssetPreviewButton::onRightClick(%this) if(%assetType $= "LevelAsset") EditLevelAssetPopup.showPopup(Canvas); else if(%assetType $= "Folder") + { + EditFolderPopup.dirPath = %this.getParent().assetPath; EditFolderPopup.showPopup(Canvas); + } else EditAssetPopup.showPopup(Canvas); @@ -1050,6 +755,7 @@ function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId) else { EditFolderPopup.showPopup(Canvas); + EditFolderPopup.assetType = "Folder"; } } else if(%itemId == 1) @@ -1126,14 +832,14 @@ function AssetBrowserFilterTree::onSelect(%this, %itemId) %breadcrumbPath = %this.getItemText(%itemId); if(%breadcrumbPath $= "") - %breadcrumbPath = AssetBrowser.currentAddress; + %breadcrumbPath = AssetBrowser.dirHandler.currentAddress; AssetBrowser.navigateTo(%breadcrumbPath); } 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 AssetBrowser-->assetList.deleteAllObjects(); @@ -1329,7 +1035,7 @@ function AssetBrowserFolderSearchFilter::onReturn( %this ) if( %text $= "" ) %this.reset(); - AssetBrowser.loadFilters(); + AssetBrowser.refresh(); } function AssetBrowserSearchFilter::onReturn( %this ) @@ -1345,7 +1051,7 @@ function AssetBrowserFolderSearchFilter::reset( %this ) { %this.setText( "Search Folders..." ); - AssetBrowser.loadFilters(); + AssetBrowser.refresh(); } function AssetBrowserSearchFilter::reset( %this ) @@ -1364,15 +1070,64 @@ function AssetBrowser_ClearAssetFilterBtn::onClick( %this ) { AssetBrowserSearchFilter.reset(); } + // // // Navigation function AssetBrowser::navigateTo(%this, %address, %historyNav) { //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 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 %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"; } AssetBrowser_NavigateBackBtn.tooltip = %backButtonHistory; %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"; } 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"); } -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; %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"); } @@ -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 = new TSStatic() + /*%newEntity = new TSStatic() { position = %pos; shapeAsset = %module @ ":" @ %asset; @@ -1820,7 +1444,7 @@ function EWorldEditor::onControlDropped( %this, %payload, %position ) EWorldEditor.clearSelection(); EWorldEditor.selectObject(%newEntity); - } + }*/ EWorldEditor.isDirty = true; } @@ -1850,7 +1474,7 @@ function AssetBrowserFilterTree::onControlDropped( %this, %payload, %position ) %path = %this.getItemValue(%item) @ "/" @ %this.getItemText(%item); 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! MessageBoxYesNo( "Move Asset", "Do you wish to move asset " @ %assetName @ " to " @ %path @ "?", diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs index 83fff992e..2d6408ddc 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs +++ b/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."); } } -// -// -// +// +// +// 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 @@ -423,6 +423,17 @@ function ImportAssetWindow::onWake(%this) { %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) @@ -466,69 +477,15 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this) if(%importConfigIdx $= "") %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.indentCount = 0; + %this.ImportingAssets = 0; + %this.FetchedAssets = 0; + %this.prunedDuplicateAssets = 0; + %this.autoRenamedAssets = 0; %this.validateAssets(); - ImportingAssetList.clear(); + AssetImportCtrl-->NewAssetsTree.clear(); + AssetImportCtrl-->NewAssetsTree.insertItem(0, "Importing Assets"); if(AssetBrowser.importAssetUnprocessedListArray.count() == 0) { @@ -838,6 +799,31 @@ function ImportAssetWindow::refresh(%this) //Continue processing %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) @@ -859,43 +845,35 @@ function ImportAssetWindow::refreshChildItem(%this, %id) //Once validated, attempt any fixes for issues %this.resolveIssue(%assetItem); - //Make sure we size correctly - ImportingAssetList.extent.x = ImportingAssetList.getParent().extent.x - 15; - //create! - %width = mRound(mRound(ImportingAssetList.extent.x) / 2); - %height = 20; - %indent = %this.indentCount * 16; %toolTip = ""; - - %iconPath = "tools/gui/images/iconInformation"; %configCommand = "ImportAssetOptionsWindow.editImportSettings(" @ %assetItem @ ");"; if(%assetType $= "Model" || %assetType $= "Animation" || %assetType $= "Image" || %assetType $= "Sound") { if(%assetItem.status $= "Error") { - %iconPath = "tools/gui/images/iconError"; + %iconIdx = 11; } else if(%assetItem.status $= "Warning") { - %iconPath = "tools/gui/images/iconWarn"; + %iconIdx = 9; } %configCommand = "ImportAssetOptionsWindow.fixIssues(" @ %assetItem @ ");"; - if(%assetItem.statusType $= "DuplicateAsset" || %assetItem.statusType $= "DuplicateImportAsset") - %assetName = %assetItem.assetName @ " "; + if(%assetItem.statusType $= "DuplicateAsset" || %assetItem.statusType $= "DuplicateImportAsset") + %assetName = %assetItem.assetName @ " "; } else { if(%assetItem.status $= "Error") { - %iconPath = "tools/gui/images/iconError"; + %iconIdx = 11; } else if(%assetItem.status $= "Warning") { - %iconPath = "tools/gui/images/iconWarn"; + %iconIdx = 9; } %configCommand = "";//"ImportAssetOptionsWindow.fixIssues(" @ %assetItem @ ");"; @@ -905,128 +883,26 @@ function ImportAssetWindow::refreshChildItem(%this, %id) } %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) + if(%assetItem.status $= "") { - %generatedField = true; - %inputField = "(Generated)"; - } - else - { - //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; } + + AssetImportCtrl-->NewAssetsTree.insertItem(%parentItem, %assetName, %assetItem, "", %iconIdx, %iconIdx+1); - %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"; - }; - }; - - ImportingAssetList.add(%importEntry); AssetBrowser.importAssetFinalListArray.add(%assetItem); if(ImportAssetTree.isParentItem(%id)) { - %this.indentCount++; - %childItem = ImportAssetTree.getChild(%id); //recurse! @@ -1035,11 +911,123 @@ function ImportAssetWindow::refreshChildItem(%this, %id) %id = ImportAssetTree.getNextSibling(%id); } - - %this.indentCount--; } -// +// +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); + + 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) { if(%assetItem.status !$= "Error" && %assetItem.status !$= "Warning") @@ -1086,8 +1074,7 @@ function ImportAssetWindow::validateAssets(%this) function ImportAssetWindow::validateAsset(%this, %id) { - - %moduleName = ImportAssetModuleList.getText(); + %moduleName = AssetImportTargetModule.getText(); while (%id > 0) { @@ -1201,7 +1188,7 @@ function ImportAssetWindow::resetAssetsValidationStatus(%this) function ImportAssetWindow::resetAssetValidationStatus(%this, %id) { - %moduleName = ImportAssetModuleList.getText(); + %moduleName = AssetImportTargetModule.getText(); %id = ImportAssetTree.getChild(%id); while (%id > 0) @@ -1239,7 +1226,7 @@ function ImportAssetWindow::checkAssetsForCollision(%this, %assetItem) function ImportAssetWindow::checkAssetForCollision(%this, %assetItem, %id) { - %moduleName = ImportAssetModuleList.getText(); + %moduleName = AssetImportTargetModule.getText(); %id = ImportAssetTree.getChild(%id); while (%id > 0) @@ -1288,7 +1275,7 @@ function ImportAssetWindow::deleteImportingAsset(%this, %assetItem) schedule(10, 0, "refreshImportAssetWindow"); //ImportAssetWindow.refresh(); - ImportAssetOptionsWindow.setVisible(0); + //ImportAssetOptionsWindow.setVisible(0); } // @@ -1298,7 +1285,7 @@ function ImportAssetWindow::ImportAssets(%this) %assetCount = AssetBrowser.importAssetFinalListArray.count(); //get the selected module data - %moduleName = ImportAssetModuleList.getText(); + %moduleName = AssetImportTargetModule.getText(); %module = ModuleDatabase.findModule(%moduleName, 1); @@ -1313,8 +1300,7 @@ function ImportAssetWindow::ImportAssets(%this) %this.doImportAssets(%id); //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); AssetBrowser.isAssetReImport = false; } @@ -1486,6 +1472,7 @@ function ImportAssetWindow::resolveIssue(%this, %assetItem) if(%resolutionAction $= "AutoPrune") { %this.deleteImportingAsset(%assetItem); + %this.prunedDuplicateAssets++; } else if(%resolutionAction $= "AutoRename") { @@ -1501,6 +1488,8 @@ function ImportAssetWindow::resolveIssue(%this, %assetItem) %num++; %assetItem.assetName = %noNum @ %num; } + + %this.autoRenamedAssets++; } } else if(%assetItem.statusType $= "MissingFile") diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.cs new file mode 100644 index 000000000..b4a5d4453 --- /dev/null +++ b/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(); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.cs index 56bc5ec06..c624850fc 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.cs @@ -3,11 +3,13 @@ function AssetBrowser::createCppAsset(%this) %moduleName = AssetBrowser.newAssetSettings.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 %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 - %cppModuleFilePath = %modulePath @ "/source/" @ %moduleName @ ".cpp"; + %cppModuleFilePath = %modulePath @ "/" @ %moduleName @ ".cpp"; if(!isFile(%cppModuleFilePath)) { %file = new FileObject(); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.cs index a684ec371..124384545 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.cs +++ b/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) { %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. //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; AssetDatabase.removeDeclaredAssets(%moduleId); @@ -41,7 +83,7 @@ function AssetBrowser::deleteFolder(%this, %folderPath) { doDeleteFolder(%folderPath); - %this.loadFilters(); + %this.loadDirectories(); } function doDeleteFolder(%folderPath) diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs index d6c7dbdc6..a014e3aae 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs @@ -5,7 +5,7 @@ function AssetBrowser::createGUIAsset(%this) %assetName = AssetBrowser.newAssetSettings.assetName; - %assetPath = AssetBrowser.currentAddress @ "/"; + %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; %guipath = %assetPath @ %assetName @ ".gui"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs index 26616ab5d..438d5e22b 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs @@ -109,7 +109,7 @@ function AssetBrowser::prepareImportImageAsset(%this, %assetItem) function AssetBrowser::importImageAsset(%this, %assetItem) { - %moduleName = ImportAssetModuleList.getText(); + %moduleName = AssetImportTargetModule.getText(); %assetType = %assetItem.AssetType; %filePath = %assetItem.filePath; @@ -117,7 +117,7 @@ function AssetBrowser::importImageAsset(%this, %assetItem) %assetImportSuccessful = false; %assetId = %moduleName@":"@%assetName; - %assetPath = AssetBrowser.currentAddress @ "/"; + %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %assetFullPath = %assetPath @ "/" @ fileName(%filePath); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.cs index 4ea263cf6..446708529 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.cs @@ -5,7 +5,7 @@ function AssetBrowser::createLevelAsset(%this) %assetName = AssetBrowser.newAssetSettings.assetName; - %assetPath = AssetBrowser.currentAddress @ "/"; + %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; %levelPath = %assetPath @ %assetName @ ".mis"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs index 05947e6e9..aebf07a64 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs @@ -5,7 +5,7 @@ function AssetBrowser::createMaterialAsset(%this) %moduleName = AssetBrowser.newAssetSettings.moduleName; %modulePath = "data/" @ %moduleName; - %assetPath = AssetBrowser.currentAddress @ "/"; + %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; %sgfPath = %assetPath @ %assetName @ ".sgf"; @@ -234,7 +234,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem) %assetItem.AOImageAsset.skip = true; %assetItem.metalnessImageAsset.skip = true; - %compositeAssetPath = AssetBrowser.currentAddress @ "/"; + %compositeAssetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %saveAsPath = %compositeAssetPath @ "/" @ %assetItem.assetName @ "_composite.png"; %compositeAsset = AssetBrowser.addImportingAsset("Image", "", %assetItem, %assetItem.assetName @ "_composite"); %compositeAsset.generatedAsset = true; @@ -279,7 +279,7 @@ function AssetBrowser::findMaterialMapFileWSuffix(%this, %fileDir, %filename, %f function AssetBrowser::importMaterialAsset(%this, %assetItem) { - %moduleName = ImportAssetModuleList.getText(); + %moduleName = AssetImportTargetModule.getText(); %assetType = %assetItem.AssetType; %filePath = %assetItem.filePath; @@ -287,7 +287,7 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem) %assetImportSuccessful = false; %assetId = %moduleName@":"@%assetName; - %assetPath = AssetBrowser.currentAddress @ "/"; + %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; %sgfPath = %assetPath @ %assetName @ ".sgf"; %scriptPath = %assetPath @ %assetName @ ".cs"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.cs index c6cf48e09..bee3ddaf2 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.cs @@ -5,7 +5,7 @@ function AssetBrowser::createScriptAsset(%this) %assetName = AssetBrowser.newAssetSettings.assetName; - %assetPath = AssetBrowser.currentAddress @ "/"; + %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; %scriptPath = %assetPath @ %assetName @ ".cs"; @@ -21,13 +21,6 @@ function AssetBrowser::createScriptAsset(%this) %moduleDef = ModuleDatabase.findModule(%moduleName, 1); AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath); - - AssetBrowser.loadFilters(); - - %treeItemId = AssetBrowserFilterTree.findItemByName(%moduleName); - %smItem = AssetBrowserFilterTree.findChildItemByName(%treeItemId, "ScriptAsset"); - - AssetBrowserFilterTree.onSelect(%smItem); %file = new FileObject(); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs index 6a03a1c83..a31069a63 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs @@ -5,7 +5,7 @@ function AssetBrowser::createShapeAsset(%this) %assetName = AssetBrowser.newAssetSettings.assetName; - %assetPath = AssetBrowser.currentAddress @ "/"; + %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; %shapeFilePath = %assetPath @ %assetName @ ".dae"; @@ -42,6 +42,11 @@ function AssetBrowser::editShapeAsset(%this, %assetDef) ShapeEditorPlugin.openShapeAsset(%assetDef); } +function AssetBrowser::deleteShapeAsset(%this, %assetDef) +{ + +} + function AssetBrowser::prepareImportShapeAsset(%this, %assetItem) { %fileExt = fileExt(%assetItem.filePath); @@ -166,7 +171,7 @@ function AssetBrowser::prepareImportShapeAsset(%this, %assetItem) function AssetBrowser::importShapeAsset(%this, %assetItem) { - %moduleName = ImportAssetModuleList.getText(); + %moduleName = AssetImportTargetModule.getText(); %assetType = %assetItem.AssetType; %filePath = %assetItem.filePath; @@ -174,7 +179,7 @@ function AssetBrowser::importShapeAsset(%this, %assetItem) %assetImportSuccessful = false; %assetId = %moduleName@":"@%assetName; - %assetPath = AssetBrowser.currentAddress @ "/"; + %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %assetFullPath = %assetPath @ fileName(%filePath); %newAsset = new ShapeAsset() @@ -309,6 +314,28 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData) %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 ) { Canvas.popDialog(EditorDragAndDropLayer); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs index 1fca1943d..e608410ff 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs @@ -6,7 +6,7 @@ function AssetBrowser::createTerrainAsset(%this) %assetName = AssetBrowser.newAssetSettings.assetName; %assetType = AssetBrowser.newAssetSettings.assetType; - %assetPath = AssetBrowser.currentAddress @ "/"; + %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; %terPath = %assetPath @ %assetName @ ".ter"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs index 5e249d59a..302480b57 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs @@ -6,7 +6,7 @@ function AssetBrowser::createTerrainMaterialAsset(%this) %assetName = AssetBrowser.newAssetSettings.assetName; %assetType = AssetBrowser.newAssetSettings.assetType; - %assetPath = AssetBrowser.currentAddress @ "/"; + %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; %scriptPath = %assetPath @ %assetName @ ".cs"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.cs new file mode 100644 index 000000000..e6d8a6fb1 --- /dev/null +++ b/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); + } +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs index 9128b75af..1203696d1 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs @@ -68,7 +68,7 @@ function AssetBrowser::refreshAsset(%this, %assetId) } AssetDatabase.refreshAsset(%assetId); - AssetBrowser.refreshPreviews(); + %this.refresh(); } //------------------------------------------------------------ @@ -129,7 +129,7 @@ function AssetBrowser::performRenameAsset(%this, %originalAssetName, %newName) } //Make sure everything is refreshed - AssetBrowser.loadFilters(); + %this.refresh(); //Update the selection to immediately jump to the new asset AssetBrowser-->filterTree.clearSelection(); @@ -173,6 +173,8 @@ function AssetBrowser::moveAsset(%this, %assetId, %destination) eval(%this @ ".move" @ %assetType @ "(" @ %assetDef @ ",\"" @ %destination @ "\");"); } } + + %this.refresh(); } //------------------------------------------------------------ @@ -212,30 +214,30 @@ function AssetBrowser::confirmDeleteAsset(%this) %currentSelectedItem = AssetBrowserFilterTree.getSelectedItem(); %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")) - eval(%this @ ".deleteFolder(\""@EditAssetPopup.assetId@"\");"); - } + eval(%this @ ".deleteFolder(\""@%folderPath@"\");"); + } else { %assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId); %assetType = AssetDatabase.getAssetType(EditAssetPopup.assetType); + if(!isObject(%assetDef)) + return; + //Do any cleanup required given the type if(%this.isMethod("delete"@%assetType)) 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(); } diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs index 602f6ce52..c6b78c3d7 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs @@ -184,8 +184,6 @@ function CreateNewAsset() %moduleDef = ModuleDatabase.findModule(%moduleName,1); AssetDatabase.addDeclaredAsset(%moduleDef, %assetFilePath); - AssetBrowser.loadFilters(); - if(AssetBrowser_newAsset.callbackFunc !$= "") { %callbackCommand = "" @ AssetBrowser_newAsset.callbackFunc @ "(\"" @ %moduleName @ ":" @ %assetName @ "\");"; @@ -193,7 +191,7 @@ function CreateNewAsset() } //Update the selection to immediately jump to the new asset - AssetBrowser-->filterTree.clearSelection(); + /*AssetBrowser-->filterTree.clearSelection(); %ModuleItem = AssetBrowser-->filterTree.findItemByName(%moduleName); %assetTypeId = AssetBrowser-->filterTree.findChildItemByName(%ModuleItem, %assetType); @@ -202,7 +200,8 @@ function CreateNewAsset() %selectedItem = AssetBrowser-->filterTree.getSelectedItem(); AssetBrowser-->filterTree.scrollVisibleByObjectId(%selectedItem); - AssetBrowser-->filterTree.buildVisibleTree(); + AssetBrowser-->filterTree.buildVisibleTree(); */ + AssetBrowser.refresh(); } function ParentComponentList::onWake(%this) diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs index d76e20633..0232166ad 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs +++ b/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) diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/selectPath.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/selectPath.cs new file mode 100644 index 000000000..943c5aa03 --- /dev/null +++ b/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); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/classIcons/material.png b/Templates/BaseGame/game/tools/classIcons/material.png new file mode 100644 index 0000000000000000000000000000000000000000..c8b2106c22d0cd92d40ea06ae0e737d6aaf97dbe GIT binary patch literal 759 zcmV5WR#I?*_?-*Ty&AKYH+Fetw>+)hdaRE`VyY}H6i z{zYQfCPBcoiGQGQ`|ayxRaNQg=qM#;W@u?~ktQc6=MYlLudRjqNK7aI6pJX`hHXFv z&UxR@M2_Q-6bR7l{aK1eqpWtTNAfNb%YYybWSbtrV}M#j&*3W#oz~Sxqd}%+k!hG@ zm?k9>2?~Wmb5N6VNemJTI*Ce)L=LHZhn;~9Rf2#wb}*>gw%sEz0j?#|;_wBxJ36}H zRvD^+tOF%5U)?*Zt@3?-=u*gQ&` zvY^B?(3wAKLW6_sl3gVlWIJa9*gpT*w&fC7P{3d%tf)6^x)+msF&0gNtf&bJOMg{j zdcj=+?ikOLOVaixF^t?4r`t9`BD^ss-@x(1&*l#qHF4AM>%l}P-%j||oo-D;5h=u* zBsS5F%dojFJSXT5B@q#}&$O2nwc9Of)K59Q=#o4;Rtg$X1;yQJKm*R30AXg9pB^h| zXJnWhwA3fS*waC6pE{k+Ht$hyVlf*Jp+LsKm6|S*P;i&)y2HU>$R*G;jrKq7k*@0% z-k-j)Uq3!nKrpR&E3n&gyF{6#o3~a61_r2JuhW;$hqPDy$OOEAX@3Fxw%C8NW8)bI pQ;epiE?%FaE2)`(ehPjIFaR=|k5OL7lRy9f002ovPDHLkV1iI$Pfq{< literal 0 HcmV?d00001 diff --git a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs index b3fa1f58e..188c7ed2c 100644 --- a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs +++ b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs @@ -459,6 +459,8 @@ function ESettingsWindow::getAssetEditingSettings(%this) } 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/AutoImport", "Automatically Import using default config", "bool", "If on, the asset importing process" @ "will attempt to automatically import any inbound assets"@ diff --git a/Templates/BaseGame/game/tools/gui/fieldTypes/buttonField.cs b/Templates/BaseGame/game/tools/gui/fieldTypes/buttonField.cs new file mode 100644 index 000000000..c0a2392a2 --- /dev/null +++ b/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); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs b/Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs index c1e9fa5ac..9d2921e5e 100644 --- a/Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs +++ b/Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs @@ -41,3 +41,4 @@ exec("./fieldTypes/assetDependencies.cs"); exec("./fieldTypes/fieldTypes.cs"); exec("./fieldTypes/listField.cs"); exec("./fieldTypes/moduleDependencies.cs"); +exec("./fieldTypes/buttonField.cs"); diff --git a/Templates/BaseGame/game/tools/gui/images/window.png b/Templates/BaseGame/game/tools/gui/images/window.png index 9aff5d276027ca3e67a5877fd8cd2c7930720a75..cc07494dfad42cc22417f8ca531581c250efb279 100644 GIT binary patch literal 6786 zcmZ`-Wl$RokPRB3xEFURMOxem9yA0>ky1Rky9KwF;uP0Hf#Oi0xKrHSJ-9=lNbmdR z?q+W0?&iIHJM(sD|Lva_4bf1-!=b_f004MkWqIg7UFM(i#KQbXy;V{i0RXaaUmZPn zsHqo&v#S%##@>>_-N)II!P46X_Rq>vMTV6wi)d!}Upulobe}q!MK>6*?$M``sRrXI z-LZs;F)G<-R1jz6x#O?oUf`Xwpe2cRY16L#eH6FQ`u+DM#I}!z&{`FexgFj&Zd{p} zXxwrB0jD(r@w?R+=~Y=AC!9R5?C9U-IOP9D+Ze44ej#KsF_PmnXO~bF91>XBGC%(P z9+80&+oNN$RMo&eGW`ibHoBGg^mxGuN0j@H z!9C}hJ!Z_{4u=k0NO4D+F#eTBOQ{!sN!C*z7VpX%mceu6hP3_oaO*LWi|qo#%9ich zfNaOw-u*`2R$uAp+R9mo|J4;6>)|x5G48#7equCu4>k4a!C)o3(MF1`Y^0UO%lEg* z(0;1s)l+xi!@Xsmo6g?Y;-B8=S`(v>H+^rDMFVzuh_}YLz900@rz85{e<5aQFV%!c zQt&**a~Ks}>FdcHb3)Z447baQjP$Eeu!!8)$+uBoRxgI{)YkPqY|*%s?-bX$(ihNM zbh0Krnx#lZ#Dg_%GBS~*US~Ih(y74|#0l2PvbNR?iDc%V(&1&v5Mj>3H0V$%K$H81 z#&v`f@uAlFM=Hb&%$f?dwJDm1n5zrUL+u>uh1XH}zN!sZ{9H0P$_D!#$ILc$xS8G& zDbm>NXerV37CjnQ3F?U8V;O#yqwDeq?UxCHJgJvLVI)~ByD>5M`vcxum>kwsS&N5e z*F#yZu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tl_tdP*Dr_l}+&T%;9Pt<- zK8H6~!PU+t^`q}Uyw8f0C#65tp~iJRqU!uZ)*zfXJ4Lq;tcS;4hvel54=*YfNvKk1j>b6n-1RYB=GU-WmJT!*6qqO<8M8m zR;J*y|JC#)w zoBoja+RH3xU3TD?0>1RWxH!r&2~~h9c=wEmg}wiq3gOslYpDL!zqnTE2>mNhyfn>y z(9nnn{%Q0qUSj&cCay0~R}FU^hYUkXl*YIgj)sOI4OCS!3RpP&)$2lGK>7XnXo<~p za)HI_N%+!mh4CpG^cxEvzt$ymCQD#-{0w`^WT1SuJVoCqGKciQBQ^4ZO!%@D$Tl5o zHe4d|*p$;ogR+I>`Lt~(w{5t1%^OpT%=E*EMo6zJ)W9#qZk zcQu6IP^ujxmYZHwo^~!C761_evfW~z#-bff254VRKgaAt3@W5fgD?AQY9J2k#>Vbo z1>Z}_r%4yCpU~9|g0;Bi(#lBtsyhJ97WJ8+cf8J%9`M>ZbjV|AlPv!a(9|h`@M^n8(2TwL2VSIUk}Iy4RQ;oP1=fG| bK%MWfG^ro4<0R$g{&9h7FI1t*HWB{=9-9^C diff --git a/Templates/BaseGame/game/tools/gui/postFxEditor.cs b/Templates/BaseGame/game/tools/gui/postFxEditor.cs index f2e3f603b..aa2710a00 100644 --- a/Templates/BaseGame/game/tools/gui/postFxEditor.cs +++ b/Templates/BaseGame/game/tools/gui/postFxEditor.cs @@ -3,31 +3,22 @@ function PostFXEditor::onDialogPush( %this ) //Apply the settings to the controls postVerbose("% - PostFX Editor - Loading GUI."); - %this.initialOpen = true; %this.refresh(); + + ESettingsWindowList.setSelectedById( 1 ); } function PostFXEditor::refresh(%this) { - PostEffectEditorInspector.clearFields(); - + PostEffectEditorList.clear(); + %count = PostFXManager.Count(); for(%i=0; %i < %count; %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) @@ -47,4 +38,16 @@ function PostFXEditor::apply(%this) function PostFXEditor::revert(%this) { PostFXManager::loadPresetHandler($PostFXManager::currentPreset); +} + +function PostEffectEditorList::onSelect( %this, %id, %text ) +{ + PostEffectEditorInspector.clearFields(); + + %postEffect = PostFXManager.getKey(%id); + + if(isObject(%postEffect) && %postEffect.isMethod("populatePostFXSettings")) + { + %postEffect.populatePostFXSettings(); + } } \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/gui/postFxEditor.gui b/Templates/BaseGame/game/tools/gui/postFxEditor.gui index 5ee336536..e1eb8e179 100644 --- a/Templates/BaseGame/game/tools/gui/postFxEditor.gui +++ b/Templates/BaseGame/game/tools/gui/postFxEditor.gui @@ -14,21 +14,6 @@ canSave = "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) { text = "PostFX Editor"; resizeWidth = "1"; @@ -46,8 +31,8 @@ anchorBottom = "0"; anchorLeft = "1"; anchorRight = "0"; - position = "306 54"; - extent = "411 615"; + position = "197 65"; + extent = "642 615"; minExtent = "8 8"; horizSizing = "center"; vertSizing = "center"; @@ -60,27 +45,25 @@ canSave = "1"; 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"; padding = "0 0 0 0"; anchorTop = "1"; anchorBottom = "0"; anchorLeft = "1"; anchorRight = "0"; - position = "3 23"; - extent = "405 558"; - minExtent = "8 2"; + position = "0 24"; + extent = "642 562"; + minExtent = "64 64"; horizSizing = "width"; vertSizing = "height"; - profile = "ToolsGuiScrollProfile"; + profile = "ToolsGuiSolidDefaultProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -89,31 +72,158 @@ 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 = "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"; - horizSizing = "width"; - vertSizing = "height"; - profile = "GuiDefaultProfile"; + 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 = "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) { @@ -121,7 +231,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - position = "309 587"; + position = "547 588"; extent = "93 23"; minExtent = "8 8"; horizSizing = "right"; @@ -142,7 +252,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - position = "111 587"; + position = "349 588"; extent = "93 23"; minExtent = "8 8"; horizSizing = "right"; @@ -163,7 +273,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - position = "12 587"; + position = "250 588"; extent = "93 23"; minExtent = "8 8"; horizSizing = "right"; @@ -184,7 +294,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - position = "210 587"; + position = "448 588"; extent = "93 23"; minExtent = "8 8"; horizSizing = "right"; diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs index 2c57ce159..ac969bb91 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs @@ -350,7 +350,7 @@ function TerrainMaterialDlg::newMat( %this ) %module = AssetBrowser.getModuleFromAddress(%path); AssetBrowser.selectedModule = %module.moduleID; - AssetBrowser.currentAddress = "data/" @ %module.moduleID; + AssetBrowser.dirHandler.currentAddress = "data/" @ %module.moduleID; AssetBrowser.setupCreateNewAsset("TerrainMaterialAsset", AssetBrowser.selectedModule); }